<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta http-equiv="X-UA-Compatible" content="ie=edge"><link rel="icon" href="./favicon.ico" type="image/x-icon"><title>Home</title></head><body class="noselect"><template id="templ-search-engine"><div class="search-bar" style="display:inline-block"><form class="searchform" action="{{url}}" {{target}}><input class="search-input" type="search" name="{{query}}" placeholder="{{name}}"></form></div></template><template id="templ-addr"><a class="addr-item {{item-id}}" href="{{url}}" {{target}} {{referrerpolicy}} {{rel}}><span class="key">{{key}}</span> <span class="name">{{name}}</span> <span class="edit">⚒</span></a></template><template id="templ-br"><div class="br"><span>↩</span><br></div></template><template id="templ-label"><div class="label"><span>{{name}}</span></div></template><template id="templ-setting"><div class="setting-container"><span>⁝</span></div><ul class="setting-button-group"><li class="edit">编 辑</li><li class="import">导 入</li><li class="export">导 出</li><li class="setting">设 置</li></ul></template><template id="templ-dialog"><div class="dialog"><div class="text-content"><textarea name="content" cols="30" rows="10">{{value}}</textarea></div><div class="setting-container"><span>⁝</span></div><ul class="setting-button-group"><li class="reset">重 置</li><li class="import">导 入</li><li class="export">导 出</li><li class="save">保 存</li><li class="cancel">取 消</li></ul></div></template><div id="root-container"></div></body><script src="https://cdn.bootcss.com/dat-gui/0.7.6/dat.gui.js"></script><script>!function(){"use strict";!function(e){if(e&&"undefined"!=typeof window){var t=document.createElement("style");t.setAttribute("type","text/css"),t.innerHTML=e,document.head.appendChild(t)}}(":root{--edit-display: none;--edit-cursor: pointer;--color-text-light: #ffffff;--color-text-dark: #000000;--body-background-color: ;--body-background-attachment: ;--body-background-repeat: ;--body-background-size: ;--body-background-position: ;--body-background-image: ;--search-bar-width: ;--search-bar-margin: ;--search-bar-font-size: ;--search-bar-color: ;--search-bar-placeholder-color: ;--search-bar-hover-focus-color: ;--addr-item-font-size: ;--addr-item-color: ;--addr-item-padding: ;--addr-item-margin: ;--addr-item-border-radius: ;--addr-item-background-color: ;--addr-item-background-hover: ;--hot-key-color: ;--hot-key-font-size: ;--hot-key-top: ;--hot-key-left: ;--label-color: ;--label-font-weight: ;--label-font-size: ;--label-padding: ;--label-line-height: }.noselect{user-select:none}html{padding:0;margin:0;width:100%;height:100%;background-color:var(--body-background-color)}@keyframes fadein{0%{opacity:0}100%{opacity:1}}body{font-size:14px;padding:0;margin:0;width:100%;min-height:100%;overflow:scroll;background-image:var(--body-background-image);background-repeat:var(--body-background-repeat);background-size:var(--body-background-size);background-position:var(--body-background-position);background-attachment:var(--body-background-attachment);animation:fadein 1.5s linear 1}body::-webkit-scrollbar{display:none}#root-container div.br{width:100%}#root-container div.br span{display:var(--edit-display);padding:.2em .6em;margin:.5em;border-radius:.3em;font-size:larger;cursor:move;background-color:var(--color-6)}#root-container div.label{width:100%}#root-container div.label span{color:var(--label-color);font-weight:var(--label-font-weight);font-size:var(--label-font-size);padding:var(--label-padding);line-height:var(--label-line-height)}.search-bar{margin:var(--search-bar-margin)}.search-bar .search-input{background:rgba(255,255,255,0);padding:10px;transition:all ease-in-out .3s;color:var(--search-bar-color);border:2px solid rgba(255,255,255,0);border-bottom:2px solid rgba(255,255,255,.3);text-shadow:1px 1px 1px rgba(0,0,0,.5);font-size:var(--search-bar-font-size);width:var(--search-bar-width)}.search-bar .search-input:hover,.search-bar .search-input:focus{outline:none;color:var(--search-bar-hover-focus-color);border-radius:30px;border:2px solid #fff;background:rgba(255,255,255,.5);text-shadow:none}.search-bar .search-input::-webkit-input-placeholder{color:var(--search-bar-placeholder-color);text-shadow:1px 1px 1px rgba(0,0,0,.5)}a.addr-item{position:relative;display:inline-block;margin:var(--addr-item-margin);background:var(--addr-item-background-color);text-decoration:none;color:var(--addr-item-color);border-radius:var(--addr-item-border-radius);cursor:var(--edit-cursor)}a.addr-item .key{position:absolute;color:var(--hot-key-color);font-size:var(--hot-key-font-size);top:var(--hot-key-top);left:var(--hot-key-left)}a.addr-item .name{display:inline-block;font-size:var(--addr-item-font-size);padding:var(--addr-item-padding)}a.addr-item:hover{background:var(--addr-item-background-hover)}a.addr-item span.edit{cursor:pointer;display:var(--edit-display);position:absolute;right:0;color:#ffeb3b;top:0;font-size:large;border-radius:33em;padding:0 .3em;background-color:#03a9f4}.mark{font-size:2em}.dg.ac{z-index:4 !important}.setting-container{z-index:2;position:fixed;bottom:50px;right:50px;width:50px;height:50px;background-color:var(--color-alpha-background);text-align:center;opacity:.2;font-size:2.5em;line-height:50px;border-radius:50px;cursor:pointer;color:#faebd7;transition:all ease-in-out .8s}.setting-container :hover{opacity:1}ul.setting-button-group{position:fixed;bottom:60px;right:40px;background-color:#fff;padding:10px 0;z-index:4;border-radius:.3em;display:none;box-shadow:5px 10px 15px 6px rgba(0,0,0,.2)}ul.setting-button-group li{list-style:none;font-size:1.4em;padding:.5em 2em;transition:all ease-in-out .3s;animation:fadein .3s linear 1;background-color:rgba(255,255,255,0)}ul.setting-button-group li:hover{background-color:bisque}ul.setting-button-group li:active{background-color:#340c92}.setting-container:hover ~ ul.setting-button-group,ul.setting-button-group:hover{display:block}.dialog{position:fixed;z-index:10;display:flex;flex-direction:column;left:0;right:0;top:0;bottom:0;background-color:var(--color-editor-background);border-radius:.3em;box-shadow:10px 10px 40px rgba(0,0,0,.329);animation:fadein .3s ease-out 1}.dialog .text-content{position:relative;width:100%;height:100%;background-color:var(--color-editor-background)}.dialog textarea{position:relative;opacity:.03}.dialog .setting-container{z-index:2;position:fixed;bottom:50px;right:50px;width:50px;height:50px;background-color:var(--color-alpha-background);text-align:center;opacity:.2;font-size:2.5em;line-height:50px;border-radius:50px;cursor:pointer;color:#faebd7;transition:all ease-in-out .8s}.dialog .setting-container :hover{opacity:1}.dialog ul.setting-button-group{position:fixed;bottom:60px;right:40px;background-color:#fff;padding:10px 0;z-index:4;border-radius:.3em;display:none;box-shadow:5px 10px 15px 6px rgba(0,0,0,.2)}.dialog ul.setting-button-group li{list-style:none;font-size:1.4em;padding:.5em 2em;transition:all ease-in-out .3s;animation:fadein .3s linear 1;background-color:rgba(255,255,255,0)}.dialog ul.setting-button-group li:hover{background-color:bisque}.dialog ul.setting-button-group li:active{background-color:#340c92}.dialog .setting-container:hover ~ ul.setting-button-group,.dialog ul.setting-button-group:hover{display:block}");class e{constructor(e){this.matchRule=e||t}bind(e,t){e instanceof HTMLElement&&(e.___binder_instanse___=this,e.___binder_data___=t);let a=[];if(e.___cached_handles___)a=e.___cached_handles___;else if(e instanceof HTMLElement)n(this,e,a);else{if(!(e instanceof Text))throw Error(`not support ${e}`);n(this,e,a)}e.___cached_handles___=a,a.forEach(e=>e(t));for(const n in t){if("function"!=typeof t[n])continue;let[a,r]=n.split("@");e instanceof HTMLElement&&e.matches(a)&&(e[r]=t[n]),e instanceof Text||e.querySelectorAll(a).forEach(e=>{e[r]=t[n]})}return e}render(e,t){let n=e.parentElement,a=t;a instanceof Array||(a=[a]);let r=[];for(let i of a){let a=e.content.cloneNode(!0);for(const e of a.childNodes)e.___binder_instanse___=this,e.___binder_data___=t,e instanceof HTMLElement&&(r.push(e),this.bind(e,i));n.appendChild(a)}return r}static getBinder(e){return e.___binder_instanse___}static getData(e){return e.___binder_data___}static from(e){return{bind:t=>{let n=e.___binder_instanse___;n&&n.bind(e,t)}}}}const t=/{{(\S+?)}}/g;function n(e,t,i){if(t instanceof Text)!function(e,t,n){if(!t.textContent.match(e.matchRule))return;const a=t.textContent;n.push(n=>{let r=!1,i=a.replace(e.matchRule,(e,t)=>(t.startsWith("#")&&(r=!0,t=t.substr(1)),n.hasOwnProperty(t)?n[t]:e));r?t.parentNode.innerHTML=i:t.textContent=i})}(e,t,i);else if(t instanceof HTMLTemplateElement){let n=t.getAttribute("name");i.push(a=>{a.hasOwnProperty(n)&&a[n]&&e.render(t,a[n])})}else t instanceof HTMLElement&&function(e,t,i){for(const n of[...t.attributes]){let{name:o,value:s}=n,d=o.match(e.matchRule);d?(t.removeAttribute(o),i.push(n=>{let a=new RegExp(e.matchRule,"");for(let e of d){let r=e.match(a)[1].trim();n.hasOwnProperty(r)&&(1==n[r]?t.setAttribute(r,""):n[r]?t.setAttribute(r,n[r]):t.removeAttribute(r))}})):"class"==o?a(e,t,i):r(e,t,i,o,s)}for(const a of t.childNodes)n(e,a,i)}(e,t,i)}function a(e,t,n){const a={};for(const r of[...t.classList]){let i=r.match(new RegExp(e.matchRule,""));if(!i)continue;let o=i[1];a[o]=r,t.classList.remove(r),n.push(n=>{if(t.classList.remove(a[o]),n.hasOwnProperty(o)){const i=n[o];a[o]=i,1==i?t.classList.add(o):i&&t.classList.add(r.replace(e.matchRule,i))}})}}function r(e,t,n,a,r){if(!r.match(e.matchRule))return;const i=r;n.push(n=>{let r=i.replace(e.matchRule,(e,t)=>n.hasOwnProperty(t)?n[t]:"");r.trim()?t.setAttribute(a,r):t.removeAttribute(a)})}class i{constructor(e){this.app=e;const t=new dat.GUI({hideable:!1});this.gui=t;const n={page:{bgColor:"#41978c",backgroundAttachment:"fixed",backgroundRepeat:"no-repeat",backgroundSize:100,backgroundPosition:"center",backgroundImage:""},label:{color:"#410f0f",fontWeight:900,fontSize:1.5,padding:.3,lineHeight:1.5},searchBar:{divColor:[0,128,255],divColorAlpha:.3,width:345,fontColor:"#FFFFFF",hoverColor:"#000",fontSize:1.5,margin:.5},addressItem:{hotKey:{color:"#000000",size:.8,top:3,left:4},fontSize:1.5,fontColor:"#000",padding:.5,margin:.3,corner:.3,bgColor:[47,232,245],bgAlpha:.144,bgHover:"#8853eb"}};t.remember(n,n.page),t.remember(n,n.label),t.remember(n,n.searchBar),t.remember(n,n.addressItem),t.remember(n,n.addressItem.hotKey);let a=t.addFolder("Page"),r=n.page;if(r){a.addColor(r,"bgColor").onChange(e=>o("--body-background-color",e)),a.add(r,"backgroundImage").onChange(e=>o("--body-background-image",e));let e=["scroll","fixed","local"];a.add(r,"backgroundAttachment",e).onChange(e=>o("--body-background-attachment",e)),e=["repeat-x","repeat-y","repeat","space","round","no-repeat"],a.add(r,"backgroundRepeat",e).onChange(e=>o("--body-background-repeat",e)),e=["top","bottom","left","right","center"],a.add(r,"backgroundPosition",e).onChange(e=>o("--body-background-position",e)),a.add(r,"backgroundSize").min(1).max(500).step(1).onChange(e=>o("--body-background-size",`${e}%`))}if(a=t.addFolder("Label"),r=n.label,r){a.addColor(r,"color").onChange(e=>o("--label-color",e));let e=["normal","bold","lighter","bolder","1","100","123","200","300","321","400","500","600","700","800","900","1000","inherit","initial","unset"];a.add(r,"fontWeight",e).onChange(e=>o("--label-font-weight",e)),a.add(r,"fontWeight").min(1).max(1e3).step(100).onChange(e=>o("--label-font-weight",e)),a.add(r,"fontSize").min(.1).max(8).onChange(e=>o("--label-font-size",`${e}em`)),a.add(r,"padding").min(.1).max(5).onChange(e=>o("--label-padding",`${e}em`)),a.add(r,"lineHeight").min(.1).max(5).onChange(e=>o("--label-line-height",`${e}em`))}if(a=t.addFolder("SearchBar"),r=n.searchBar,r&&(a.add(r,"width").min(100).max(1e3).onChange(e=>o("--search-bar-width",`${e}px`)),a.add(r,"margin").min(.1).max(4).onChange(e=>o("--search-bar-margin",`${e}em`)),a.add(r,"fontSize").min(.1).max(10).onChange(e=>o("--search-bar-font-size",`${e}em`)),a.addColor(r,"hoverColor").onChange(e=>o("--search-bar-hover-focus-color",e)),a.addColor(r,"fontColor").onChange(e=>{o("--search-bar-color",e),o("--search-bar-placeholder-color",e)})),a=t.addFolder("AddressItem"),r=n.addressItem,r){const e=r;a.add(r,"fontSize").min(.1).max(10).onChange(e=>o("--addr-item-font-size",`${e}em`)),a.add(r,"padding").min(.1).max(10).onChange(e=>o("--addr-item-padding",`${e}em`)),a.add(r,"margin").min(.1).max(4).onChange(e=>o("--addr-item-margin",`${e}em`)),a.add(r,"corner").min(0).max(10).onChange(e=>o("--addr-item-border-radius",`${e}em`)),a.add(r,"bgAlpha").min(0).max(1).onChange(t=>o("--addr-item-background-color",`rgba(${[...e.bgColor,t]})`)),a.addColor(r,"fontColor").onChange(e=>o("--addr-item-color",e)),a.addColor(r,"bgColor").onChange(t=>o("--addr-item-backgroung-color",`rgba(${[...t,e.bgAlpha]})`)),a.addColor(r,"bgHover").onChange(e=>o("--addr-item-background-hover",e))}a=a.addFolder("HotKey"),r=r.hotKey,r&&(a.addColor(r,"color").onChange(e=>{o("--hot-key-color",e)}),a.add(r,"size").min(.1).max(5).onChange(e=>{o("--hot-key-font-size",`${e}em`)}),a.add(r,"top").onChange(e=>{o("--hot-key-top",`${e}px`)}),a.add(r,"left").onChange(e=>{o("--hot-key-left",`${e}px`)})),t.revert(),this.gui.hide()}toggle(){this.show?this.gui.hide():this.gui.show(),this.show=!this.show}}function o(e,t){(function(e){let t=[...document.styleSheets.item(2).rules].filter(t=>t.selectorText==e)[0];return t||console.warn(e),t.style})(":root").setProperty(e,t)}class s{static stringify(e,t,n){let a=0,r={},i={};for(const t in e)if(e.hasOwnProperty(t)){const n=e[t];if("function"==typeof n){let e=n.toString();r[t]=`E⁣E-${a++}-E⁤E`,i[r[t]]=e}else r[t]=n}return JSON.stringify(r,t,n).replace(/"(E\u2063E-\d+-E\u2064E)"/gi,(e,t)=>i[t])}static parse(e){return window.eval(`(${e})`)}}class d{constructor(e){return this.promise=e||Promise.resolve(),this}load(){var e=[...arguments];return this.promise=this.promise.then(()=>{console.log("load:"+JSON.stringify(e));var t=d.getLoadPromises(e);return Promise.all(t).catch(e=>console.error(e))}),new d(this.promise)}then(e,t){return this.promise=this.promise.then(n=>new Promise((a,r)=>{t?e(a,n):a(n=e(n))}).catch(e=>console.error(e))),new d(this.promise)}wait(e){return this.then(t=>{setTimeout(t,e)},!0)}hide(e){return e=e||"body",this.then(()=>{document.querySelector(e).style.display="none"})}show(e){return e=e||"body",this.then(()=>{document.querySelector(e).style.display=""})}static config(e){Object.assign(d.configuration,e)}static getLoadPromises(e){return d.getUrls(e).map(e=>new Promise((t,n)=>{switch(d.parseType(e)){case"js":d.loadScript(e,t);break;case"css":d.loadLink(e,t);break;default:console.error("unknow type! "+e)}}))}static loadScript(e,t){var n=document.createElement("script");n.type="text/javascript",n.charset="utf-8",n.async=!0,n.src=e,d.appendNode(n,e,t)}static loadLink(e,t){var n=document.createElement("link");n.rel="stylesheet",n.href=e,d.appendNode(n,e,t)}static getUrls(e){var t=[];return e.forEach(e=>{if("function"!=typeof e){var n=d.configuration[e];n?t=t.concat(n):t.push(e)}else e()}),t}static appendNode(e,t,n){d.loaded[t]?n():(e.onload=function(){d.loaded[t]=!0,n()},e.onerror=function(e){console.error(JSON.stringify(e)),n()},document.head.appendChild(e))}static parseType(e){var t=e.split("?")[0].split(".");return t[t.length-1].toLowerCase()}}d.loaded={},d.configuration={};var l=d,h=document.createElement("style");h.appendChild(document.createTextNode("")),document.head.appendChild(h),h.sheet.insertRule("\n.CodeMirror {\n  font-size: 1.2rem;\n  font-family: Consolas !important;\n}\n",0),h.sheet.insertRule("\n.CodeMirror-gutters {\n}\n",0),h.sheet.insertRule("\n.cm-invalidchar-u20 {\n  color: rgba(200, 200, 200, 0.1);\n}\n",0),h.sheet.insertRule("\n.cm-matchhighlight {\n  background-color: darkgreen\n}\n",0),h.sheet.insertRule("\n.CodeMirror-selection-highlight-scrollbar {\n  background-color: green\n}\n",0),h.sheet.insertRule("\n.CodeMirror-lint-tooltip {\n  background-color: #ffd;\n  border: 1px solid black;\n  border-radius: 4px 4px 4px 4px;\n  color: black;\n  font-family: monospace;\n  font-size: 10pt;\n  overflow: hidden;\n  padding: 2px 5px;\n  position: fixed;\n  white-space: pre;\n  white-space: pre-wrap;\n  z-index: 2010;\n  max-width: 600px;\n  opacity: 0;\n  transition: opacity .4s;\n}\n",0);var c=class{static load(){return(new l).load("https://cdn.bootcss.com/codemirror/5.38.0/codemirror.min.js").load("https://cdn.bootcss.com/codemirror/5.38.0/mode/javascript/javascript.min.js","https://cdn.bootcss.com/codemirror/5.38.0/codemirror.min.css","https://cdn.bootcss.com/codemirror/5.38.0/theme/bespin.min.css","https://cdn.bootcss.com/codemirror/5.38.0/mode/xml/xml.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/dialog/dialog.min.css","https://cdn.bootcss.com/codemirror/5.38.0/addon/dialog/dialog.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/edit/matchbrackets.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/fold/foldcode.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/fold/brace-fold.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/fold/indent-fold.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/fold/foldgutter.min.css","https://cdn.bootcss.com/codemirror/5.38.0/addon/fold/foldgutter.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/edit/closebrackets.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/selection/selection-pointer.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/selection/mark-selection.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/selection/active-line.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/search/search.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/search/searchcursor.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/search/matchesonscrollbar.min.css","https://cdn.bootcss.com/codemirror/5.38.0/addon/search/matchesonscrollbar.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/search/match-highlighter.min.js","https://cdn.bootcss.com/codemirror/5.38.0/addon/scroll/annotatescrollbar.min.js").then(()=>{!function(){function e(e){this.timeout=null,this.onMouseOver=function(e){!function(e,n){var a=n.target||n.srcElement;/\bcm-number/.test(a.className)&&/^(\d{10}|\d{13})$/.test(a.innerText)&&function(e,n){var a=n.target||n.srcElement,r=document.createDocumentFragment();r.appendChild(function(e){var t=document.createElement("div");return t.className="CodeMirror-code-tooltip",t.appendChild(document.createTextNode(e)),t}(e)),function(e,n,a){var r=function(e,t){var n=document.createElement("div");function a(e){if(!n.parentNode)return CodeMirror.off(document,"mousemove",a);n.style.top=Math.max(0,e.clientY-n.offsetHeight-5)+"px",n.style.left=e.clientX+5+"px"}return n.className="CodeMirror-lint-tooltip",n.appendChild(t.cloneNode(!0)),document.body.appendChild(n),CodeMirror.on(document,"mousemove",a),a(e),null!=n.style.opacity&&(n.style.opacity=1),n}(e,n);function i(){var e;CodeMirror.off(a,"mouseout",i),r&&((e=r).parentNode&&(null==e.style.opacity&&t(e),e.style.opacity=0,setTimeout((function(){t(e)}),600)),r=null)}var o=setInterval((function(){if(r)for(var e=a;;e=e.parentNode){if(e&&11==e.nodeType&&(e=e.host),e==document.body)return;if(!e){i();break}}if(!r)return clearInterval(o)}),400);CodeMirror.on(a,"mouseout",i)}(n,r,a)}(Date.str(parseInt(a.innerText)),n)}(0,e)}}function t(e){e.parentNode&&e.parentNode.removeChild(e)}u||(u=!0,CodeMirror.defineOption("codeToolTip",!1,(function(t,n,a){if(a&&a!=CodeMirror.Init&&CodeMirror.off(t.getWrapperElement(),"mouseover",t.state.codeToolTip.onMouseOver),n){var r=t.state.codeToolTip=new e(t);CodeMirror.on(t.getWrapperElement(),"mouseover",r.onMouseOver)}})))}()})}};var u=!1;const f=new e;class g{constructor(e){this.app=e,this.init()}init(){let e=document.getElementById("templ-setting");f.render(e,{".edit@onclick":()=>{postMessage({"event:editor:iseditormode":!0},location.origin),this.showDialog()},".import@onclick":()=>{let e=document.createElement("input");e.type="file",e.accept="image/png",e.onchange=async e=>{let t=e.target.files[0],n=await this.app.picStore.readImageDataV2(t);await this.app.store.saveAllString(n),location.reload()},e.click()},".export@onclick":async()=>{let e=await this.app.store.loadAllString();this.app.picStore.createImageV2("all",e)},".setting@onclick":async()=>{this.app.setting.toggle()}})}async showDialog(){const e=this.app.store,t=this.app.view;let n,a=await e.loadString(),r=document.getElementById("templ-dialog"),i=f.render(r,{title:"this is dialog title",value:a,".reset@onclick":async t=>{let a=await e.loadDefaultString();n.setValue(a)},".cancel@onclick":e=>{postMessage({"event:editor:iseditormode":!1},location.origin),e.target.parentElement.parentElement.remove()},".save@onclick":async a=>{postMessage({"event:editor:iseditormode":!1},location.origin);let r=a.target.parentElement.parentElement;await e.save(s.parse(n.getValue())),t.initItems(),r.remove()},".import@onclick":()=>{let e=document.createElement("input");e.type="file",e.accept="image/png",e.onchange=async e=>{var t=e.target.files[0];let a=await this.app.picStore.readImageDataV2(t);a=this.app.store.getPageCfg(a),n.setValue(a)},e.click()},".export@onclick":async()=>{let e=this.app.store.buildPageCfg(n.getValue());this.app.picStore.createImageV2(location.hash,e)}})[0].querySelector("textarea");c.load().then(()=>{n=CodeMirror.fromTextArea(i,{lineNumbers:!0,matchBrackets:!0,lineWrapping:!1,mode:{name:"javascript",globalVars:!0},foldGutter:!0,autoCloseBrackets:!0,codeToolTip:!0,gutters:["CodeMirror-linenumbers","CodeMirror-foldgutter","CodeMirror-lint-markers"],highlightSelectionMatches:{showToken:/\w/,annotateScrollbar:!0}}),n.setOption("theme","bespin"),n.setSize("100%","100%"),n.setOption("foldOptions",{minFoldSize:1}),n.setOption("extraKeys",{"Ctrl-Y":e=>CodeMirror.commands.foldAll(e),"Ctrl-I":e=>CodeMirror.commands.unfoldAll(e),"Ctrl-Q":e=>CodeMirror.commands.toggleFold(e)}),setTimeout(()=>{n.refresh()},100),this.onStateChanged=()=>{n.refresh()}})}}const p=()=>[];var m=Math.floor(1099511627776*Math.random()).toString(16),_=new RegExp('"@__(F|R|D|M|S|U)-'+m+'-(\\d+)__@"',"g"),b=/\{\s*\[native code\]\s*\}/g,w=/function.*?\(/,v=/.*?=>.*?/,k=/[<>\/\u2028\u2029]/g,y=["*","async"],x={"<":"\\u003C",">":"\\u003E","/":"\\u002F","\u2028":"\\u2028","\u2029":"\\u2029"};function z(e){return x[e]}var C=function e(t,n){n||(n={}),"number"!=typeof n&&"string"!=typeof n||(n={space:n});var a,r=[],i=[],o=[],s=[],d=[],l=[];return n.ignoreFunction&&"function"==typeof t&&(t=void 0),void 0===t?String(t):"string"!=typeof(a=n.isJSON&&!n.space?JSON.stringify(t):JSON.stringify(t,n.isJSON?null:function(e,t){if(n.ignoreFunction&&function(e){var t=[];for(var n in e)"function"==typeof e[n]&&t.push(n);for(var a=0;a<t.length;a++)delete e[t[a]]}(t),!t&&void 0!==t)return t;var a=this[e],h=typeof a;if("object"===h){if(a instanceof RegExp)return"@__R-"+m+"-"+(i.push(a)-1)+"__@";if(a instanceof Date)return"@__D-"+m+"-"+(o.push(a)-1)+"__@";if(a instanceof Map)return"@__M-"+m+"-"+(s.push(a)-1)+"__@";if(a instanceof Set)return"@__S-"+m+"-"+(d.push(a)-1)+"__@"}return"function"===h?"@__F-"+m+"-"+(r.push(a)-1)+"__@":"undefined"===h?"@__U-"+m+"-"+(l.push(a)-1)+"__@":t},n.space))?String(a):(!0!==n.unsafe&&(a=a.replace(k,z)),0===r.length&&0===i.length&&0===o.length&&0===s.length&&0===d.length&&0===l.length?a:a.replace(_,(function(t,a,l){return"D"===a?'new Date("'+o[l].toISOString()+'")':"R"===a?"new RegExp("+e(i[l].source)+', "'+i[l].flags+'")':"M"===a?"new Map("+e(Array.from(s[l].entries()),n)+")":"S"===a?"new Set("+e(Array.from(d[l].values()),n)+")":"U"===a?"undefined":function(e){var t=e.toString();if(b.test(t))throw new TypeError("Serializing native function: "+e.name);if(w.test(t))return t;if(v.test(t))return t;var n=t.indexOf("("),a=t.substr(0,n).trim().split(" ").filter((function(e){return e.length>0}));return a.filter((function(e){return-1===y.indexOf(e)})).length>0?(a.indexOf("async")>-1?"async ":"")+"function"+(a.join("").indexOf("*")>-1?"*":"")+t.substr(n):t}(r[l])})))};const S="home_page",E=()=>new Promise((function(e,t){console.debug("getDb ...");var n=indexedDB.open("home_page_db",1);n.onsuccess=function(t){let n=this.result;console.debug("getDb DONE"),e(n)},n.onerror=function(e){console.error("getDb:",e.target.errorCode)},n.onupgradeneeded=function(e){console.log("getDb.onupgradeneeded"),e.currentTarget.result.createObjectStore(S,{keyPath:"key"}).createIndex("key","key",{unique:!0})}}));class A{static get(e){return E().then(t=>new Promise((function(n,a){t.transaction([S]).objectStore(S).get(e).onsuccess=function(e){e.target.result?n(e.target.result.data):n()}})))}static list(){return E().then(e=>new Promise((t,n)=>{e.transaction([S]).objectStore(S).getAllKeys().onsuccess=e=>{t(e.target.result)}}))}static put(e,t){return E().then(n=>new Promise((a,r)=>{var i=n.transaction([S],"readwrite");i.oncomplete=function(e){console.log("All done!"),a(e)},i.onerror=function(e){console.error(e),r(e)},i.objectStore(S).put({key:e,data:t}).onsuccess=function(e){console.log("add data over success!")}}))}}const B="store_key:"+location.hash;class R{constructor(e){this.app=e}async load(){let e=await A.get(B);return e?s.parse(e):p}async loadString(){let e=await this.load();return C(e,{unsafe:!0,space:4})}async loadDefaultString(){return C(p,{unsafe:!0,space:4})}async save(e){let t=C(e,{unsafe:!0,space:4});await this.saveString(t)}async saveString(e){await A.put(B,e)}async reset(){let e=await this.loadDefaultString();await A.put(B,e)}async loadAllString(){let e=await A.list(),t={};for(const n of e)t[n]=await A.get(n);return C(t,{unsafe:!0,space:4})}async saveAllString(e){let t=s.parse(e);for(const e in t)await A.put(e,t[e])}buildPageCfg(e){let t={};return t[B]=e,C(t)}getPageCfg(e){let t=s.parse(e),n=this.loadDefaultString();for(const e in t)if(n=t[e],e==B)return n;return n}getPageHash(e){let t=s.parse(e),n=location.hash;for(const e in t)if(n=e.replace("store_key:",""),e==B)return location.hash;return n}}class I{constructor(e){this.app=e,this.store=e.store,this.templSearchEngine=document.getElementById("templ-search-engine"),this.templAddr=document.getElementById("templ-addr"),this.templBr=document.getElementById("templ-br"),this.templLabel=document.getElementById("templ-label");try{this.initItems()}catch(e){console.error(e),alert(e.stack)}}async initItems(){let e=(await this.store.load())();const{templSearchEngine:t,templAddr:n,templBr:a}=this,r=this.app.binder,i=document.getElementById("root-container");i.innerHTML="";const o=e=>{let t=e.content.cloneNode(!0).firstElementChild;return i.appendChild(t),t};for(const i of e)"search-engine"==i.type?r.bind(o(t),i):"addr"==i.type?r.bind(o(n),i):"action"==i.type?r.bind(o(n),i):"label"==i.type?r.bind(o(this.templLabel),i):"br"==i.type?o(a):"init"==i.type?i.run():(alert("unknown type : "+JSON.stringify(i)),console.error(new Error("unknown type : "+JSON.stringify(i))))}}class O{constructor(e){this.app=e,this.blockHotKey=!1,this.isEditMode=!1,this.initHotKey()}initHotKey(){const{app:e}=this;document.body.addEventListener("keydown",t=>{if(console.log(t.key),this.blockHotKey)return;if(this.isEditMode)return;if("*"==t.key&&t.ctrlKey&&t.shiftKey)return void e.setting.toggle();const n=[];document.querySelectorAll("a.addr-item").forEach(e=>{let a=e.querySelector(".key").textContent.trim();e.classList.remove("mark"),t.key==a.substr(0,1)&&(e.classList.add("mark"),n.push(e))}),1==n.length&&n[0].click()})}}var M,D=(function(e,t){var n="undefined"!=typeof Uint8Array&&"undefined"!=typeof Uint16Array&&"undefined"!=typeof Int32Array;function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.assign=function(e){for(var t=Array.prototype.slice.call(arguments,1);t.length;){var n=t.shift();if(n){if("object"!=typeof n)throw new TypeError(n+"must be non-object");for(var r in n)a(n,r)&&(e[r]=n[r])}}return e},t.shrinkBuf=function(e,t){return e.length===t?e:e.subarray?e.subarray(0,t):(e.length=t,e)};var r={arraySet:function(e,t,n,a,r){if(t.subarray&&e.subarray)e.set(t.subarray(n,n+a),r);else for(var i=0;i<a;i++)e[r+i]=t[n+i]},flattenChunks:function(e){var t,n,a,r,i,o;for(a=0,t=0,n=e.length;t<n;t++)a+=e[t].length;for(o=new Uint8Array(a),r=0,t=0,n=e.length;t<n;t++)i=e[t],o.set(i,r),r+=i.length;return o}},i={arraySet:function(e,t,n,a,r){for(var i=0;i<a;i++)e[r+i]=t[n+i]},flattenChunks:function(e){return[].concat.apply([],e)}};t.setTyped=function(e){e?(t.Buf8=Uint8Array,t.Buf16=Uint16Array,t.Buf32=Int32Array,t.assign(t,r)):(t.Buf8=Array,t.Buf16=Array,t.Buf32=Array,t.assign(t,i))},t.setTyped(n)}(M={exports:{}},M.exports),M.exports),T=(D.assign,D.shrinkBuf,D.setTyped,D.Buf8,D.Buf16,D.Buf32,4),N=0,L=1,U=2;function F(e){for(var t=e.length;--t>=0;)e[t]=0}var j=0,Z=1,H=2,P=29,$=256,K=$+1+P,V=30,q=19,J=2*K+1,W=15,Y=16,G=7,X=256,Q=16,ee=17,te=18,ne=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0],ae=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13],re=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7],ie=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],oe=new Array(2*(K+2));F(oe);var se=new Array(2*V);F(se);var de=new Array(512);F(de);var le=new Array(256);F(le);var he=new Array(P);F(he);var ce,ue,fe,ge=new Array(V);function pe(e,t,n,a,r){this.static_tree=e,this.extra_bits=t,this.extra_base=n,this.elems=a,this.max_length=r,this.has_stree=e&&e.length}function me(e,t){this.dyn_tree=e,this.max_code=0,this.stat_desc=t}function _e(e){return e<256?de[e]:de[256+(e>>>7)]}function be(e,t){e.pending_buf[e.pending++]=255&t,e.pending_buf[e.pending++]=t>>>8&255}function we(e,t,n){e.bi_valid>Y-n?(e.bi_buf|=t<<e.bi_valid&65535,be(e,e.bi_buf),e.bi_buf=t>>Y-e.bi_valid,e.bi_valid+=n-Y):(e.bi_buf|=t<<e.bi_valid&65535,e.bi_valid+=n)}function ve(e,t,n){we(e,n[2*t],n[2*t+1])}function ke(e,t){var n=0;do{n|=1&e,e>>>=1,n<<=1}while(--t>0);return n>>>1}function ye(e,t,n){var a,r,i=new Array(W+1),o=0;for(a=1;a<=W;a++)i[a]=o=o+n[a-1]<<1;for(r=0;r<=t;r++){var s=e[2*r+1];0!==s&&(e[2*r]=ke(i[s]++,s))}}function xe(e){var t;for(t=0;t<K;t++)e.dyn_ltree[2*t]=0;for(t=0;t<V;t++)e.dyn_dtree[2*t]=0;for(t=0;t<q;t++)e.bl_tree[2*t]=0;e.dyn_ltree[2*X]=1,e.opt_len=e.static_len=0,e.last_lit=e.matches=0}function ze(e){e.bi_valid>8?be(e,e.bi_buf):e.bi_valid>0&&(e.pending_buf[e.pending++]=e.bi_buf),e.bi_buf=0,e.bi_valid=0}function Ce(e,t,n,a){var r=2*t,i=2*n;return e[r]<e[i]||e[r]===e[i]&&a[t]<=a[n]}function Se(e,t,n){for(var a=e.heap[n],r=n<<1;r<=e.heap_len&&(r<e.heap_len&&Ce(t,e.heap[r+1],e.heap[r],e.depth)&&r++,!Ce(t,a,e.heap[r],e.depth));)e.heap[n]=e.heap[r],n=r,r<<=1;e.heap[n]=a}function Ee(e,t,n){var a,r,i,o,s=0;if(0!==e.last_lit)do{a=e.pending_buf[e.d_buf+2*s]<<8|e.pending_buf[e.d_buf+2*s+1],r=e.pending_buf[e.l_buf+s],s++,0===a?ve(e,r,t):(ve(e,(i=le[r])+$+1,t),0!==(o=ne[i])&&we(e,r-=he[i],o),ve(e,i=_e(--a),n),0!==(o=ae[i])&&we(e,a-=ge[i],o))}while(s<e.last_lit);ve(e,X,t)}function Ae(e,t){var n,a,r,i=t.dyn_tree,o=t.stat_desc.static_tree,s=t.stat_desc.has_stree,d=t.stat_desc.elems,l=-1;for(e.heap_len=0,e.heap_max=J,n=0;n<d;n++)0!==i[2*n]?(e.heap[++e.heap_len]=l=n,e.depth[n]=0):i[2*n+1]=0;for(;e.heap_len<2;)i[2*(r=e.heap[++e.heap_len]=l<2?++l:0)]=1,e.depth[r]=0,e.opt_len--,s&&(e.static_len-=o[2*r+1]);for(t.max_code=l,n=e.heap_len>>1;n>=1;n--)Se(e,i,n);r=d;do{n=e.heap[1],e.heap[1]=e.heap[e.heap_len--],Se(e,i,1),a=e.heap[1],e.heap[--e.heap_max]=n,e.heap[--e.heap_max]=a,i[2*r]=i[2*n]+i[2*a],e.depth[r]=(e.depth[n]>=e.depth[a]?e.depth[n]:e.depth[a])+1,i[2*n+1]=i[2*a+1]=r,e.heap[1]=r++,Se(e,i,1)}while(e.heap_len>=2);e.heap[--e.heap_max]=e.heap[1],function(e,t){var n,a,r,i,o,s,d=t.dyn_tree,l=t.max_code,h=t.stat_desc.static_tree,c=t.stat_desc.has_stree,u=t.stat_desc.extra_bits,f=t.stat_desc.extra_base,g=t.stat_desc.max_length,p=0;for(i=0;i<=W;i++)e.bl_count[i]=0;for(d[2*e.heap[e.heap_max]+1]=0,n=e.heap_max+1;n<J;n++)(i=d[2*d[2*(a=e.heap[n])+1]+1]+1)>g&&(i=g,p++),d[2*a+1]=i,a>l||(e.bl_count[i]++,o=0,a>=f&&(o=u[a-f]),s=d[2*a],e.opt_len+=s*(i+o),c&&(e.static_len+=s*(h[2*a+1]+o)));if(0!==p){do{for(i=g-1;0===e.bl_count[i];)i--;e.bl_count[i]--,e.bl_count[i+1]+=2,e.bl_count[g]--,p-=2}while(p>0);for(i=g;0!==i;i--)for(a=e.bl_count[i];0!==a;)(r=e.heap[--n])>l||(d[2*r+1]!==i&&(e.opt_len+=(i-d[2*r+1])*d[2*r],d[2*r+1]=i),a--)}}(e,t),ye(i,l,e.bl_count)}function Be(e,t,n){var a,r,i=-1,o=t[1],s=0,d=7,l=4;for(0===o&&(d=138,l=3),t[2*(n+1)+1]=65535,a=0;a<=n;a++)r=o,o=t[2*(a+1)+1],++s<d&&r===o||(s<l?e.bl_tree[2*r]+=s:0!==r?(r!==i&&e.bl_tree[2*r]++,e.bl_tree[2*Q]++):s<=10?e.bl_tree[2*ee]++:e.bl_tree[2*te]++,s=0,i=r,0===o?(d=138,l=3):r===o?(d=6,l=3):(d=7,l=4))}function Re(e,t,n){var a,r,i=-1,o=t[1],s=0,d=7,l=4;for(0===o&&(d=138,l=3),a=0;a<=n;a++)if(r=o,o=t[2*(a+1)+1],!(++s<d&&r===o)){if(s<l)do{ve(e,r,e.bl_tree)}while(0!=--s);else 0!==r?(r!==i&&(ve(e,r,e.bl_tree),s--),ve(e,Q,e.bl_tree),we(e,s-3,2)):s<=10?(ve(e,ee,e.bl_tree),we(e,s-3,3)):(ve(e,te,e.bl_tree),we(e,s-11,7));s=0,i=r,0===o?(d=138,l=3):r===o?(d=6,l=3):(d=7,l=4)}}F(ge);var Ie=!1;function Oe(e,t,n,a){we(e,(j<<1)+(a?1:0),3),function(e,t,n,a){ze(e),a&&(be(e,n),be(e,~n)),D.arraySet(e.pending_buf,e.window,t,n,e.pending),e.pending+=n}(e,t,n,!0)}var Me={_tr_init:function(e){Ie||(!function(){var e,t,n,a,r,i=new Array(W+1);for(n=0,a=0;a<P-1;a++)for(he[a]=n,e=0;e<1<<ne[a];e++)le[n++]=a;for(le[n-1]=a,r=0,a=0;a<16;a++)for(ge[a]=r,e=0;e<1<<ae[a];e++)de[r++]=a;for(r>>=7;a<V;a++)for(ge[a]=r<<7,e=0;e<1<<ae[a]-7;e++)de[256+r++]=a;for(t=0;t<=W;t++)i[t]=0;for(e=0;e<=143;)oe[2*e+1]=8,e++,i[8]++;for(;e<=255;)oe[2*e+1]=9,e++,i[9]++;for(;e<=279;)oe[2*e+1]=7,e++,i[7]++;for(;e<=287;)oe[2*e+1]=8,e++,i[8]++;for(ye(oe,K+1,i),e=0;e<V;e++)se[2*e+1]=5,se[2*e]=ke(e,5);ce=new pe(oe,ne,$+1,K,W),ue=new pe(se,ae,0,V,W),fe=new pe(new Array(0),re,0,q,G)}(),Ie=!0),e.l_desc=new me(e.dyn_ltree,ce),e.d_desc=new me(e.dyn_dtree,ue),e.bl_desc=new me(e.bl_tree,fe),e.bi_buf=0,e.bi_valid=0,xe(e)},_tr_stored_block:Oe,_tr_flush_block:function(e,t,n,a){var r,i,o=0;e.level>0?(e.strm.data_type===U&&(e.strm.data_type=function(e){var t,n=4093624447;for(t=0;t<=31;t++,n>>>=1)if(1&n&&0!==e.dyn_ltree[2*t])return N;if(0!==e.dyn_ltree[18]||0!==e.dyn_ltree[20]||0!==e.dyn_ltree[26])return L;for(t=32;t<$;t++)if(0!==e.dyn_ltree[2*t])return L;return N}(e)),Ae(e,e.l_desc),Ae(e,e.d_desc),o=function(e){var t;for(Be(e,e.dyn_ltree,e.l_desc.max_code),Be(e,e.dyn_dtree,e.d_desc.max_code),Ae(e,e.bl_desc),t=q-1;t>=3&&0===e.bl_tree[2*ie[t]+1];t--);return e.opt_len+=3*(t+1)+5+5+4,t}(e),r=e.opt_len+3+7>>>3,(i=e.static_len+3+7>>>3)<=r&&(r=i)):r=i=n+5,n+4<=r&&-1!==t?Oe(e,t,n,a):e.strategy===T||i===r?(we(e,(Z<<1)+(a?1:0),3),Ee(e,oe,se)):(we(e,(H<<1)+(a?1:0),3),function(e,t,n,a){var r;for(we(e,t-257,5),we(e,n-1,5),we(e,a-4,4),r=0;r<a;r++)we(e,e.bl_tree[2*ie[r]+1],3);Re(e,e.dyn_ltree,t-1),Re(e,e.dyn_dtree,n-1)}(e,e.l_desc.max_code+1,e.d_desc.max_code+1,o+1),Ee(e,e.dyn_ltree,e.dyn_dtree)),xe(e),a&&ze(e)},_tr_tally:function(e,t,n){return e.pending_buf[e.d_buf+2*e.last_lit]=t>>>8&255,e.pending_buf[e.d_buf+2*e.last_lit+1]=255&t,e.pending_buf[e.l_buf+e.last_lit]=255&n,e.last_lit++,0===t?e.dyn_ltree[2*n]++:(e.matches++,t--,e.dyn_ltree[2*(le[n]+$+1)]++,e.dyn_dtree[2*_e(t)]++),e.last_lit===e.lit_bufsize-1},_tr_align:function(e){we(e,Z<<1,3),ve(e,X,oe),function(e){16===e.bi_valid?(be(e,e.bi_buf),e.bi_buf=0,e.bi_valid=0):e.bi_valid>=8&&(e.pending_buf[e.pending++]=255&e.bi_buf,e.bi_buf>>=8,e.bi_valid-=8)}(e)}};var De=function(e,t,n,a){for(var r=65535&e|0,i=e>>>16&65535|0,o=0;0!==n;){n-=o=n>2e3?2e3:n;do{i=i+(r=r+t[a++]|0)|0}while(--o);r%=65521,i%=65521}return r|i<<16|0};var Te=function(){for(var e,t=[],n=0;n<256;n++){e=n;for(var a=0;a<8;a++)e=1&e?3988292384^e>>>1:e>>>1;t[n]=e}return t}();var Ne,Le=function(e,t,n,a){var r=Te,i=a+n;e^=-1;for(var o=a;o<i;o++)e=e>>>8^r[255&(e^t[o])];return-1^e},Ue={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Fe=0,je=1,Ze=3,He=4,Pe=5,$e=0,Ke=1,Ve=-2,qe=-3,Je=-5,We=-1,Ye=1,Ge=2,Xe=3,Qe=4,et=0,tt=2,nt=8,at=9,rt=15,it=8,ot=286,st=30,dt=19,lt=2*ot+1,ht=15,ct=3,ut=258,ft=ut+ct+1,gt=32,pt=42,mt=69,_t=73,bt=91,wt=103,vt=113,kt=666,yt=1,xt=2,zt=3,Ct=4,St=3;function Et(e,t){return e.msg=Ue[t],t}function At(e){return(e<<1)-(e>4?9:0)}function Bt(e){for(var t=e.length;--t>=0;)e[t]=0}function Rt(e){var t=e.state,n=t.pending;n>e.avail_out&&(n=e.avail_out),0!==n&&(D.arraySet(e.output,t.pending_buf,t.pending_out,n,e.next_out),e.next_out+=n,t.pending_out+=n,e.total_out+=n,e.avail_out-=n,t.pending-=n,0===t.pending&&(t.pending_out=0))}function It(e,t){Me._tr_flush_block(e,e.block_start>=0?e.block_start:-1,e.strstart-e.block_start,t),e.block_start=e.strstart,Rt(e.strm)}function Ot(e,t){e.pending_buf[e.pending++]=t}function Mt(e,t){e.pending_buf[e.pending++]=t>>>8&255,e.pending_buf[e.pending++]=255&t}function Dt(e,t){var n,a,r=e.max_chain_length,i=e.strstart,o=e.prev_length,s=e.nice_match,d=e.strstart>e.w_size-ft?e.strstart-(e.w_size-ft):0,l=e.window,h=e.w_mask,c=e.prev,u=e.strstart+ut,f=l[i+o-1],g=l[i+o];e.prev_length>=e.good_match&&(r>>=2),s>e.lookahead&&(s=e.lookahead);do{if(l[(n=t)+o]===g&&l[n+o-1]===f&&l[n]===l[i]&&l[++n]===l[i+1]){i+=2,n++;do{}while(l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&l[++i]===l[++n]&&i<u);if(a=ut-(u-i),i=u-ut,a>o){if(e.match_start=t,o=a,a>=s)break;f=l[i+o-1],g=l[i+o]}}}while((t=c[t&h])>d&&0!=--r);return o<=e.lookahead?o:e.lookahead}function Tt(e){var t,n,a,r,i,o,s,d,l,h,c=e.w_size;do{if(r=e.window_size-e.lookahead-e.strstart,e.strstart>=c+(c-ft)){D.arraySet(e.window,e.window,c,c,0),e.match_start-=c,e.strstart-=c,e.block_start-=c,t=n=e.hash_size;do{a=e.head[--t],e.head[t]=a>=c?a-c:0}while(--n);t=n=c;do{a=e.prev[--t],e.prev[t]=a>=c?a-c:0}while(--n);r+=c}if(0===e.strm.avail_in)break;if(o=e.strm,s=e.window,d=e.strstart+e.lookahead,l=r,h=void 0,(h=o.avail_in)>l&&(h=l),n=0===h?0:(o.avail_in-=h,D.arraySet(s,o.input,o.next_in,h,d),1===o.state.wrap?o.adler=De(o.adler,s,h,d):2===o.state.wrap&&(o.adler=Le(o.adler,s,h,d)),o.next_in+=h,o.total_in+=h,h),e.lookahead+=n,e.lookahead+e.insert>=ct)for(i=e.strstart-e.insert,e.ins_h=e.window[i],e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+1])&e.hash_mask;e.insert&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[i+ct-1])&e.hash_mask,e.prev[i&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=i,i++,e.insert--,!(e.lookahead+e.insert<ct)););}while(e.lookahead<ft&&0!==e.strm.avail_in)}function Nt(e,t){for(var n,a;;){if(e.lookahead<ft){if(Tt(e),e.lookahead<ft&&t===Fe)return yt;if(0===e.lookahead)break}if(n=0,e.lookahead>=ct&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+ct-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),0!==n&&e.strstart-n<=e.w_size-ft&&(e.match_length=Dt(e,n)),e.match_length>=ct)if(a=Me._tr_tally(e,e.strstart-e.match_start,e.match_length-ct),e.lookahead-=e.match_length,e.match_length<=e.max_lazy_match&&e.lookahead>=ct){e.match_length--;do{e.strstart++,e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+ct-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart}while(0!=--e.match_length);e.strstart++}else e.strstart+=e.match_length,e.match_length=0,e.ins_h=e.window[e.strstart],e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+1])&e.hash_mask;else a=Me._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++;if(a&&(It(e,!1),0===e.strm.avail_out))return yt}return e.insert=e.strstart<ct-1?e.strstart:ct-1,t===He?(It(e,!0),0===e.strm.avail_out?zt:Ct):e.last_lit&&(It(e,!1),0===e.strm.avail_out)?yt:xt}function Lt(e,t){for(var n,a,r;;){if(e.lookahead<ft){if(Tt(e),e.lookahead<ft&&t===Fe)return yt;if(0===e.lookahead)break}if(n=0,e.lookahead>=ct&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+ct-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart),e.prev_length=e.match_length,e.prev_match=e.match_start,e.match_length=ct-1,0!==n&&e.prev_length<e.max_lazy_match&&e.strstart-n<=e.w_size-ft&&(e.match_length=Dt(e,n),e.match_length<=5&&(e.strategy===Ye||e.match_length===ct&&e.strstart-e.match_start>4096)&&(e.match_length=ct-1)),e.prev_length>=ct&&e.match_length<=e.prev_length){r=e.strstart+e.lookahead-ct,a=Me._tr_tally(e,e.strstart-1-e.prev_match,e.prev_length-ct),e.lookahead-=e.prev_length-1,e.prev_length-=2;do{++e.strstart<=r&&(e.ins_h=(e.ins_h<<e.hash_shift^e.window[e.strstart+ct-1])&e.hash_mask,n=e.prev[e.strstart&e.w_mask]=e.head[e.ins_h],e.head[e.ins_h]=e.strstart)}while(0!=--e.prev_length);if(e.match_available=0,e.match_length=ct-1,e.strstart++,a&&(It(e,!1),0===e.strm.avail_out))return yt}else if(e.match_available){if((a=Me._tr_tally(e,0,e.window[e.strstart-1]))&&It(e,!1),e.strstart++,e.lookahead--,0===e.strm.avail_out)return yt}else e.match_available=1,e.strstart++,e.lookahead--}return e.match_available&&(a=Me._tr_tally(e,0,e.window[e.strstart-1]),e.match_available=0),e.insert=e.strstart<ct-1?e.strstart:ct-1,t===He?(It(e,!0),0===e.strm.avail_out?zt:Ct):e.last_lit&&(It(e,!1),0===e.strm.avail_out)?yt:xt}function Ut(e,t,n,a,r){this.good_length=e,this.max_lazy=t,this.nice_length=n,this.max_chain=a,this.func=r}function Ft(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=nt,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new D.Buf16(2*lt),this.dyn_dtree=new D.Buf16(2*(2*st+1)),this.bl_tree=new D.Buf16(2*(2*dt+1)),Bt(this.dyn_ltree),Bt(this.dyn_dtree),Bt(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new D.Buf16(ht+1),this.heap=new D.Buf16(2*ot+1),Bt(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new D.Buf16(2*ot+1),Bt(this.depth),this.l_buf=0,this.lit_bufsize=0,this.last_lit=0,this.d_buf=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}function jt(e){var t;return e&&e.state?(e.total_in=e.total_out=0,e.data_type=tt,(t=e.state).pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap?pt:vt,e.adler=2===t.wrap?0:1,t.last_flush=Fe,Me._tr_init(t),$e):Et(e,Ve)}function Zt(e){var t,n=jt(e);return n===$e&&((t=e.state).window_size=2*t.w_size,Bt(t.head),t.max_lazy_match=Ne[t.level].max_lazy,t.good_match=Ne[t.level].good_length,t.nice_match=Ne[t.level].nice_length,t.max_chain_length=Ne[t.level].max_chain,t.strstart=0,t.block_start=0,t.lookahead=0,t.insert=0,t.match_length=t.prev_length=ct-1,t.match_available=0,t.ins_h=0),n}function Ht(e,t,n,a,r,i){if(!e)return Ve;var o=1;if(t===We&&(t=6),a<0?(o=0,a=-a):a>15&&(o=2,a-=16),r<1||r>at||n!==nt||a<8||a>15||t<0||t>9||i<0||i>Qe)return Et(e,Ve);8===a&&(a=9);var s=new Ft;return e.state=s,s.strm=e,s.wrap=o,s.gzhead=null,s.w_bits=a,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=r+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+ct-1)/ct),s.window=new D.Buf8(2*s.w_size),s.head=new D.Buf16(s.hash_size),s.prev=new D.Buf16(s.w_size),s.lit_bufsize=1<<r+6,s.pending_buf_size=4*s.lit_bufsize,s.pending_buf=new D.Buf8(s.pending_buf_size),s.d_buf=1*s.lit_bufsize,s.l_buf=3*s.lit_bufsize,s.level=t,s.strategy=i,s.method=n,Zt(e)}Ne=[new Ut(0,0,0,0,(function(e,t){var n=65535;for(n>e.pending_buf_size-5&&(n=e.pending_buf_size-5);;){if(e.lookahead<=1){if(Tt(e),0===e.lookahead&&t===Fe)return yt;if(0===e.lookahead)break}e.strstart+=e.lookahead,e.lookahead=0;var a=e.block_start+n;if((0===e.strstart||e.strstart>=a)&&(e.lookahead=e.strstart-a,e.strstart=a,It(e,!1),0===e.strm.avail_out))return yt;if(e.strstart-e.block_start>=e.w_size-ft&&(It(e,!1),0===e.strm.avail_out))return yt}return e.insert=0,t===He?(It(e,!0),0===e.strm.avail_out?zt:Ct):(e.strstart>e.block_start&&(It(e,!1),e.strm.avail_out),yt)})),new Ut(4,4,8,4,Nt),new Ut(4,5,16,8,Nt),new Ut(4,6,32,32,Nt),new Ut(4,4,16,16,Lt),new Ut(8,16,32,32,Lt),new Ut(8,16,128,128,Lt),new Ut(8,32,128,256,Lt),new Ut(32,128,258,1024,Lt),new Ut(32,258,258,4096,Lt)];var Pt={deflateInit:function(e,t){return Ht(e,t,nt,rt,it,et)},deflateInit2:Ht,deflateReset:Zt,deflateResetKeep:jt,deflateSetHeader:function(e,t){return e&&e.state?2!==e.state.wrap?Ve:(e.state.gzhead=t,$e):Ve},deflate:function(e,t){var n,a,r,i;if(!e||!e.state||t>Pe||t<0)return e?Et(e,Ve):Ve;if(a=e.state,!e.output||!e.input&&0!==e.avail_in||a.status===kt&&t!==He)return Et(e,0===e.avail_out?Je:Ve);if(a.strm=e,n=a.last_flush,a.last_flush=t,a.status===pt)if(2===a.wrap)e.adler=0,Ot(a,31),Ot(a,139),Ot(a,8),a.gzhead?(Ot(a,(a.gzhead.text?1:0)+(a.gzhead.hcrc?2:0)+(a.gzhead.extra?4:0)+(a.gzhead.name?8:0)+(a.gzhead.comment?16:0)),Ot(a,255&a.gzhead.time),Ot(a,a.gzhead.time>>8&255),Ot(a,a.gzhead.time>>16&255),Ot(a,a.gzhead.time>>24&255),Ot(a,9===a.level?2:a.strategy>=Ge||a.level<2?4:0),Ot(a,255&a.gzhead.os),a.gzhead.extra&&a.gzhead.extra.length&&(Ot(a,255&a.gzhead.extra.length),Ot(a,a.gzhead.extra.length>>8&255)),a.gzhead.hcrc&&(e.adler=Le(e.adler,a.pending_buf,a.pending,0)),a.gzindex=0,a.status=mt):(Ot(a,0),Ot(a,0),Ot(a,0),Ot(a,0),Ot(a,0),Ot(a,9===a.level?2:a.strategy>=Ge||a.level<2?4:0),Ot(a,St),a.status=vt);else{var o=nt+(a.w_bits-8<<4)<<8;o|=(a.strategy>=Ge||a.level<2?0:a.level<6?1:6===a.level?2:3)<<6,0!==a.strstart&&(o|=gt),o+=31-o%31,a.status=vt,Mt(a,o),0!==a.strstart&&(Mt(a,e.adler>>>16),Mt(a,65535&e.adler)),e.adler=1}if(a.status===mt)if(a.gzhead.extra){for(r=a.pending;a.gzindex<(65535&a.gzhead.extra.length)&&(a.pending!==a.pending_buf_size||(a.gzhead.hcrc&&a.pending>r&&(e.adler=Le(e.adler,a.pending_buf,a.pending-r,r)),Rt(e),r=a.pending,a.pending!==a.pending_buf_size));)Ot(a,255&a.gzhead.extra[a.gzindex]),a.gzindex++;a.gzhead.hcrc&&a.pending>r&&(e.adler=Le(e.adler,a.pending_buf,a.pending-r,r)),a.gzindex===a.gzhead.extra.length&&(a.gzindex=0,a.status=_t)}else a.status=_t;if(a.status===_t)if(a.gzhead.name){r=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>r&&(e.adler=Le(e.adler,a.pending_buf,a.pending-r,r)),Rt(e),r=a.pending,a.pending===a.pending_buf_size)){i=1;break}i=a.gzindex<a.gzhead.name.length?255&a.gzhead.name.charCodeAt(a.gzindex++):0,Ot(a,i)}while(0!==i);a.gzhead.hcrc&&a.pending>r&&(e.adler=Le(e.adler,a.pending_buf,a.pending-r,r)),0===i&&(a.gzindex=0,a.status=bt)}else a.status=bt;if(a.status===bt)if(a.gzhead.comment){r=a.pending;do{if(a.pending===a.pending_buf_size&&(a.gzhead.hcrc&&a.pending>r&&(e.adler=Le(e.adler,a.pending_buf,a.pending-r,r)),Rt(e),r=a.pending,a.pending===a.pending_buf_size)){i=1;break}i=a.gzindex<a.gzhead.comment.length?255&a.gzhead.comment.charCodeAt(a.gzindex++):0,Ot(a,i)}while(0!==i);a.gzhead.hcrc&&a.pending>r&&(e.adler=Le(e.adler,a.pending_buf,a.pending-r,r)),0===i&&(a.status=wt)}else a.status=wt;if(a.status===wt&&(a.gzhead.hcrc?(a.pending+2>a.pending_buf_size&&Rt(e),a.pending+2<=a.pending_buf_size&&(Ot(a,255&e.adler),Ot(a,e.adler>>8&255),e.adler=0,a.status=vt)):a.status=vt),0!==a.pending){if(Rt(e),0===e.avail_out)return a.last_flush=-1,$e}else if(0===e.avail_in&&At(t)<=At(n)&&t!==He)return Et(e,Je);if(a.status===kt&&0!==e.avail_in)return Et(e,Je);if(0!==e.avail_in||0!==a.lookahead||t!==Fe&&a.status!==kt){var s=a.strategy===Ge?function(e,t){for(var n;;){if(0===e.lookahead&&(Tt(e),0===e.lookahead)){if(t===Fe)return yt;break}if(e.match_length=0,n=Me._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++,n&&(It(e,!1),0===e.strm.avail_out))return yt}return e.insert=0,t===He?(It(e,!0),0===e.strm.avail_out?zt:Ct):e.last_lit&&(It(e,!1),0===e.strm.avail_out)?yt:xt}(a,t):a.strategy===Xe?function(e,t){for(var n,a,r,i,o=e.window;;){if(e.lookahead<=ut){if(Tt(e),e.lookahead<=ut&&t===Fe)return yt;if(0===e.lookahead)break}if(e.match_length=0,e.lookahead>=ct&&e.strstart>0&&(a=o[r=e.strstart-1])===o[++r]&&a===o[++r]&&a===o[++r]){i=e.strstart+ut;do{}while(a===o[++r]&&a===o[++r]&&a===o[++r]&&a===o[++r]&&a===o[++r]&&a===o[++r]&&a===o[++r]&&a===o[++r]&&r<i);e.match_length=ut-(i-r),e.match_length>e.lookahead&&(e.match_length=e.lookahead)}if(e.match_length>=ct?(n=Me._tr_tally(e,1,e.match_length-ct),e.lookahead-=e.match_length,e.strstart+=e.match_length,e.match_length=0):(n=Me._tr_tally(e,0,e.window[e.strstart]),e.lookahead--,e.strstart++),n&&(It(e,!1),0===e.strm.avail_out))return yt}return e.insert=0,t===He?(It(e,!0),0===e.strm.avail_out?zt:Ct):e.last_lit&&(It(e,!1),0===e.strm.avail_out)?yt:xt}(a,t):Ne[a.level].func(a,t);if(s!==zt&&s!==Ct||(a.status=kt),s===yt||s===zt)return 0===e.avail_out&&(a.last_flush=-1),$e;if(s===xt&&(t===je?Me._tr_align(a):t!==Pe&&(Me._tr_stored_block(a,0,0,!1),t===Ze&&(Bt(a.head),0===a.lookahead&&(a.strstart=0,a.block_start=0,a.insert=0))),Rt(e),0===e.avail_out))return a.last_flush=-1,$e}return t!==He?$e:a.wrap<=0?Ke:(2===a.wrap?(Ot(a,255&e.adler),Ot(a,e.adler>>8&255),Ot(a,e.adler>>16&255),Ot(a,e.adler>>24&255),Ot(a,255&e.total_in),Ot(a,e.total_in>>8&255),Ot(a,e.total_in>>16&255),Ot(a,e.total_in>>24&255)):(Mt(a,e.adler>>>16),Mt(a,65535&e.adler)),Rt(e),a.wrap>0&&(a.wrap=-a.wrap),0!==a.pending?$e:Ke)},deflateEnd:function(e){var t;return e&&e.state?(t=e.state.status)!==pt&&t!==mt&&t!==_t&&t!==bt&&t!==wt&&t!==vt&&t!==kt?Et(e,Ve):(e.state=null,t===vt?Et(e,qe):$e):Ve},deflateSetDictionary:function(e,t){var n,a,r,i,o,s,d,l,h=t.length;if(!e||!e.state)return Ve;if(2===(i=(n=e.state).wrap)||1===i&&n.status!==pt||n.lookahead)return Ve;for(1===i&&(e.adler=De(e.adler,t,h,0)),n.wrap=0,h>=n.w_size&&(0===i&&(Bt(n.head),n.strstart=0,n.block_start=0,n.insert=0),l=new D.Buf8(n.w_size),D.arraySet(l,t,h-n.w_size,n.w_size,0),t=l,h=n.w_size),o=e.avail_in,s=e.next_in,d=e.input,e.avail_in=h,e.next_in=0,e.input=t,Tt(n);n.lookahead>=ct;){a=n.strstart,r=n.lookahead-(ct-1);do{n.ins_h=(n.ins_h<<n.hash_shift^n.window[a+ct-1])&n.hash_mask,n.prev[a&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=a,a++}while(--r);n.strstart=a,n.lookahead=ct-1,Tt(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=ct-1,n.match_available=0,e.next_in=s,e.input=d,e.avail_in=o,n.wrap=i,$e},deflateInfo:"pako deflate (from Nodeca project)"},$t=!0,Kt=!0;try{String.fromCharCode.apply(null,[0])}catch(e){$t=!1}try{String.fromCharCode.apply(null,new Uint8Array(1))}catch(e){Kt=!1}for(var Vt=new D.Buf8(256),qt=0;qt<256;qt++)Vt[qt]=qt>=252?6:qt>=248?5:qt>=240?4:qt>=224?3:qt>=192?2:1;Vt[254]=Vt[254]=1;function Jt(e,t){if(t<65534&&(e.subarray&&Kt||!e.subarray&&$t))return String.fromCharCode.apply(null,D.shrinkBuf(e,t));for(var n="",a=0;a<t;a++)n+=String.fromCharCode(e[a]);return n}var Wt={string2buf:function(e){var t,n,a,r,i,o=e.length,s=0;for(r=0;r<o;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<o&&56320==(64512&(a=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(a-56320),r++),s+=n<128?1:n<2048?2:n<65536?3:4;for(t=new D.Buf8(s),i=0,r=0;i<s;r++)55296==(64512&(n=e.charCodeAt(r)))&&r+1<o&&56320==(64512&(a=e.charCodeAt(r+1)))&&(n=65536+(n-55296<<10)+(a-56320),r++),n<128?t[i++]=n:n<2048?(t[i++]=192|n>>>6,t[i++]=128|63&n):n<65536?(t[i++]=224|n>>>12,t[i++]=128|n>>>6&63,t[i++]=128|63&n):(t[i++]=240|n>>>18,t[i++]=128|n>>>12&63,t[i++]=128|n>>>6&63,t[i++]=128|63&n);return t},buf2binstring:function(e){return Jt(e,e.length)},binstring2buf:function(e){for(var t=new D.Buf8(e.length),n=0,a=t.length;n<a;n++)t[n]=e.charCodeAt(n);return t},buf2string:function(e,t){var n,a,r,i,o=t||e.length,s=new Array(2*o);for(a=0,n=0;n<o;)if((r=e[n++])<128)s[a++]=r;else if((i=Vt[r])>4)s[a++]=65533,n+=i-1;else{for(r&=2===i?31:3===i?15:7;i>1&&n<o;)r=r<<6|63&e[n++],i--;i>1?s[a++]=65533:r<65536?s[a++]=r:(r-=65536,s[a++]=55296|r>>10&1023,s[a++]=56320|1023&r)}return Jt(s,a)},utf8border:function(e,t){var n;for((t=t||e.length)>e.length&&(t=e.length),n=t-1;n>=0&&128==(192&e[n]);)n--;return n<0?t:0===n?t:n+Vt[e[n]]>t?n:t}};var Yt=function(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0},Gt=Object.prototype.toString,Xt=0,Qt=-1,en=0,tn=8;function nn(e){if(!(this instanceof nn))return new nn(e);this.options=D.assign({level:Qt,method:tn,chunkSize:16384,windowBits:15,memLevel:8,strategy:en,to:""},e||{});var t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Yt,this.strm.avail_out=0;var n=Pt.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(n!==Xt)throw new Error(Ue[n]);if(t.header&&Pt.deflateSetHeader(this.strm,t.header),t.dictionary){var a;if(a="string"==typeof t.dictionary?Wt.string2buf(t.dictionary):"[object ArrayBuffer]"===Gt.call(t.dictionary)?new Uint8Array(t.dictionary):t.dictionary,(n=Pt.deflateSetDictionary(this.strm,a))!==Xt)throw new Error(Ue[n]);this._dict_set=!0}}function an(e,t){var n=new nn(t);if(n.push(e,!0),n.err)throw n.msg||Ue[n.err];return n.result}nn.prototype.push=function(e,t){var n,a,r=this.strm,i=this.options.chunkSize;if(this.ended)return!1;a=t===~~t?t:!0===t?4:0,"string"==typeof e?r.input=Wt.string2buf(e):"[object ArrayBuffer]"===Gt.call(e)?r.input=new Uint8Array(e):r.input=e,r.next_in=0,r.avail_in=r.input.length;do{if(0===r.avail_out&&(r.output=new D.Buf8(i),r.next_out=0,r.avail_out=i),1!==(n=Pt.deflate(r,a))&&n!==Xt)return this.onEnd(n),this.ended=!0,!1;0!==r.avail_out&&(0!==r.avail_in||4!==a&&2!==a)||("string"===this.options.to?this.onData(Wt.buf2binstring(D.shrinkBuf(r.output,r.next_out))):this.onData(D.shrinkBuf(r.output,r.next_out)))}while((r.avail_in>0||0===r.avail_out)&&1!==n);return 4===a?(n=Pt.deflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===Xt):2!==a||(this.onEnd(Xt),r.avail_out=0,!0)},nn.prototype.onData=function(e){this.chunks.push(e)},nn.prototype.onEnd=function(e){e===Xt&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=D.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var rn={Deflate:nn,deflate:an,deflateRaw:function(e,t){return(t=t||{}).raw=!0,an(e,t)},gzip:function(e,t){return(t=t||{}).gzip=!0,an(e,t)}},on=function(e,t){var n,a,r,i,o,s,d,l,h,c,u,f,g,p,m,_,b,w,v,k,y,x,z,C,S;n=e.state,a=e.next_in,C=e.input,r=a+(e.avail_in-5),i=e.next_out,S=e.output,o=i-(t-e.avail_out),s=i+(e.avail_out-257),d=n.dmax,l=n.wsize,h=n.whave,c=n.wnext,u=n.window,f=n.hold,g=n.bits,p=n.lencode,m=n.distcode,_=(1<<n.lenbits)-1,b=(1<<n.distbits)-1;e:do{g<15&&(f+=C[a++]<<g,g+=8,f+=C[a++]<<g,g+=8),w=p[f&_];t:for(;;){if(f>>>=v=w>>>24,g-=v,0===(v=w>>>16&255))S[i++]=65535&w;else{if(!(16&v)){if(0==(64&v)){w=p[(65535&w)+(f&(1<<v)-1)];continue t}if(32&v){n.mode=12;break e}e.msg="invalid literal/length code",n.mode=30;break e}k=65535&w,(v&=15)&&(g<v&&(f+=C[a++]<<g,g+=8),k+=f&(1<<v)-1,f>>>=v,g-=v),g<15&&(f+=C[a++]<<g,g+=8,f+=C[a++]<<g,g+=8),w=m[f&b];n:for(;;){if(f>>>=v=w>>>24,g-=v,!(16&(v=w>>>16&255))){if(0==(64&v)){w=m[(65535&w)+(f&(1<<v)-1)];continue n}e.msg="invalid distance code",n.mode=30;break e}if(y=65535&w,g<(v&=15)&&(f+=C[a++]<<g,(g+=8)<v&&(f+=C[a++]<<g,g+=8)),(y+=f&(1<<v)-1)>d){e.msg="invalid distance too far back",n.mode=30;break e}if(f>>>=v,g-=v,y>(v=i-o)){if((v=y-v)>h&&n.sane){e.msg="invalid distance too far back",n.mode=30;break e}if(x=0,z=u,0===c){if(x+=l-v,v<k){k-=v;do{S[i++]=u[x++]}while(--v);x=i-y,z=S}}else if(c<v){if(x+=l+c-v,(v-=c)<k){k-=v;do{S[i++]=u[x++]}while(--v);if(x=0,c<k){k-=v=c;do{S[i++]=u[x++]}while(--v);x=i-y,z=S}}}else if(x+=c-v,v<k){k-=v;do{S[i++]=u[x++]}while(--v);x=i-y,z=S}for(;k>2;)S[i++]=z[x++],S[i++]=z[x++],S[i++]=z[x++],k-=3;k&&(S[i++]=z[x++],k>1&&(S[i++]=z[x++]))}else{x=i-y;do{S[i++]=S[x++],S[i++]=S[x++],S[i++]=S[x++],k-=3}while(k>2);k&&(S[i++]=S[x++],k>1&&(S[i++]=S[x++]))}break}}break}}while(a<r&&i<s);a-=k=g>>3,f&=(1<<(g-=k<<3))-1,e.next_in=a,e.next_out=i,e.avail_in=a<r?r-a+5:5-(a-r),e.avail_out=i<s?s-i+257:257-(i-s),n.hold=f,n.bits=g},sn=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0],dn=[16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78],ln=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0],hn=[16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64],cn=function(e,t,n,a,r,i,o,s){var d,l,h,c,u,f,g,p,m,_=s.bits,b=0,w=0,v=0,k=0,y=0,x=0,z=0,C=0,S=0,E=0,A=null,B=0,R=new D.Buf16(16),I=new D.Buf16(16),O=null,M=0;for(b=0;b<=15;b++)R[b]=0;for(w=0;w<a;w++)R[t[n+w]]++;for(y=_,k=15;k>=1&&0===R[k];k--);if(y>k&&(y=k),0===k)return r[i++]=20971520,r[i++]=20971520,s.bits=1,0;for(v=1;v<k&&0===R[v];v++);for(y<v&&(y=v),C=1,b=1;b<=15;b++)if(C<<=1,(C-=R[b])<0)return-1;if(C>0&&(0===e||1!==k))return-1;for(I[1]=0,b=1;b<15;b++)I[b+1]=I[b]+R[b];for(w=0;w<a;w++)0!==t[n+w]&&(o[I[t[n+w]]++]=w);if(0===e?(A=O=o,f=19):1===e?(A=sn,B-=257,O=dn,M-=257,f=256):(A=ln,O=hn,f=-1),E=0,w=0,b=v,u=i,x=y,z=0,h=-1,c=(S=1<<y)-1,1===e&&S>852||2===e&&S>592)return 1;for(;;){g=b-z,o[w]<f?(p=0,m=o[w]):o[w]>f?(p=O[M+o[w]],m=A[B+o[w]]):(p=96,m=0),d=1<<b-z,v=l=1<<x;do{r[u+(E>>z)+(l-=d)]=g<<24|p<<16|m|0}while(0!==l);for(d=1<<b-1;E&d;)d>>=1;if(0!==d?(E&=d-1,E+=d):E=0,w++,0==--R[b]){if(b===k)break;b=t[n+o[w]]}if(b>y&&(E&c)!==h){for(0===z&&(z=y),u+=v,C=1<<(x=b-z);x+z<k&&!((C-=R[x+z])<=0);)x++,C<<=1;if(S+=1<<x,1===e&&S>852||2===e&&S>592)return 1;r[h=E&c]=y<<24|x<<16|u-i|0}}return 0!==E&&(r[u+E]=b-z<<24|64<<16|0),s.bits=y,0},un=0,fn=1,gn=2,pn=4,mn=5,_n=6,bn=0,wn=1,vn=2,kn=-2,yn=-3,xn=-4,zn=-5,Cn=8,Sn=1,En=2,An=3,Bn=4,Rn=5,In=6,On=7,Mn=8,Dn=9,Tn=10,Nn=11,Ln=12,Un=13,Fn=14,jn=15,Zn=16,Hn=17,Pn=18,$n=19,Kn=20,Vn=21,qn=22,Jn=23,Wn=24,Yn=25,Gn=26,Xn=27,Qn=28,ea=29,ta=30,na=31,aa=32,ra=852,ia=592,oa=15;function sa(e){return(e>>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function da(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new D.Buf16(320),this.work=new D.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function la(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=Sn,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new D.Buf32(ra),t.distcode=t.distdyn=new D.Buf32(ia),t.sane=1,t.back=-1,bn):kn}function ha(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,la(e)):kn}function ca(e,t){var n,a;return e&&e.state?(a=e.state,t<0?(n=0,t=-t):(n=1+(t>>4),t<48&&(t&=15)),t&&(t<8||t>15)?kn:(null!==a.window&&a.wbits!==t&&(a.window=null),a.wrap=n,a.wbits=t,ha(e))):kn}function ua(e,t){var n,a;return e?(a=new da,e.state=a,a.window=null,(n=ca(e,t))!==bn&&(e.state=null),n):kn}var fa,ga,pa=!0;function ma(e){if(pa){var t;for(fa=new D.Buf32(512),ga=new D.Buf32(32),t=0;t<144;)e.lens[t++]=8;for(;t<256;)e.lens[t++]=9;for(;t<280;)e.lens[t++]=7;for(;t<288;)e.lens[t++]=8;for(cn(fn,e.lens,0,288,fa,0,e.work,{bits:9}),t=0;t<32;)e.lens[t++]=5;cn(gn,e.lens,0,32,ga,0,e.work,{bits:5}),pa=!1}e.lencode=fa,e.lenbits=9,e.distcode=ga,e.distbits=5}function _a(e,t,n,a){var r,i=e.state;return null===i.window&&(i.wsize=1<<i.wbits,i.wnext=0,i.whave=0,i.window=new D.Buf8(i.wsize)),a>=i.wsize?(D.arraySet(i.window,t,n-i.wsize,i.wsize,0),i.wnext=0,i.whave=i.wsize):((r=i.wsize-i.wnext)>a&&(r=a),D.arraySet(i.window,t,n-a,r,i.wnext),(a-=r)?(D.arraySet(i.window,t,n-a,a,0),i.wnext=a,i.whave=i.wsize):(i.wnext+=r,i.wnext===i.wsize&&(i.wnext=0),i.whave<i.wsize&&(i.whave+=r))),0}var ba={inflateReset:ha,inflateReset2:ca,inflateResetKeep:la,inflateInit:function(e){return ua(e,oa)},inflateInit2:ua,inflate:function(e,t){var n,a,r,i,o,s,d,l,h,c,u,f,g,p,m,_,b,w,v,k,y,x,z,C,S=0,E=new D.Buf8(4),A=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];if(!e||!e.state||!e.output||!e.input&&0!==e.avail_in)return kn;(n=e.state).mode===Ln&&(n.mode=Un),o=e.next_out,r=e.output,d=e.avail_out,i=e.next_in,a=e.input,s=e.avail_in,l=n.hold,h=n.bits,c=s,u=d,x=bn;e:for(;;)switch(n.mode){case Sn:if(0===n.wrap){n.mode=Un;break}for(;h<16;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}if(2&n.wrap&&35615===l){n.check=0,E[0]=255&l,E[1]=l>>>8&255,n.check=Le(n.check,E,2,0),l=0,h=0,n.mode=En;break}if(n.flags=0,n.head&&(n.head.done=!1),!(1&n.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",n.mode=ta;break}if((15&l)!==Cn){e.msg="unknown compression method",n.mode=ta;break}if(h-=4,y=8+(15&(l>>>=4)),0===n.wbits)n.wbits=y;else if(y>n.wbits){e.msg="invalid window size",n.mode=ta;break}n.dmax=1<<y,e.adler=n.check=1,n.mode=512&l?Tn:Ln,l=0,h=0;break;case En:for(;h<16;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}if(n.flags=l,(255&n.flags)!==Cn){e.msg="unknown compression method",n.mode=ta;break}if(57344&n.flags){e.msg="unknown header flags set",n.mode=ta;break}n.head&&(n.head.text=l>>8&1),512&n.flags&&(E[0]=255&l,E[1]=l>>>8&255,n.check=Le(n.check,E,2,0)),l=0,h=0,n.mode=An;case An:for(;h<32;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}n.head&&(n.head.time=l),512&n.flags&&(E[0]=255&l,E[1]=l>>>8&255,E[2]=l>>>16&255,E[3]=l>>>24&255,n.check=Le(n.check,E,4,0)),l=0,h=0,n.mode=Bn;case Bn:for(;h<16;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}n.head&&(n.head.xflags=255&l,n.head.os=l>>8),512&n.flags&&(E[0]=255&l,E[1]=l>>>8&255,n.check=Le(n.check,E,2,0)),l=0,h=0,n.mode=Rn;case Rn:if(1024&n.flags){for(;h<16;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}n.length=l,n.head&&(n.head.extra_len=l),512&n.flags&&(E[0]=255&l,E[1]=l>>>8&255,n.check=Le(n.check,E,2,0)),l=0,h=0}else n.head&&(n.head.extra=null);n.mode=In;case In:if(1024&n.flags&&((f=n.length)>s&&(f=s),f&&(n.head&&(y=n.head.extra_len-n.length,n.head.extra||(n.head.extra=new Array(n.head.extra_len)),D.arraySet(n.head.extra,a,i,f,y)),512&n.flags&&(n.check=Le(n.check,a,f,i)),s-=f,i+=f,n.length-=f),n.length))break e;n.length=0,n.mode=On;case On:if(2048&n.flags){if(0===s)break e;f=0;do{y=a[i+f++],n.head&&y&&n.length<65536&&(n.head.name+=String.fromCharCode(y))}while(y&&f<s);if(512&n.flags&&(n.check=Le(n.check,a,f,i)),s-=f,i+=f,y)break e}else n.head&&(n.head.name=null);n.length=0,n.mode=Mn;case Mn:if(4096&n.flags){if(0===s)break e;f=0;do{y=a[i+f++],n.head&&y&&n.length<65536&&(n.head.comment+=String.fromCharCode(y))}while(y&&f<s);if(512&n.flags&&(n.check=Le(n.check,a,f,i)),s-=f,i+=f,y)break e}else n.head&&(n.head.comment=null);n.mode=Dn;case Dn:if(512&n.flags){for(;h<16;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}if(l!==(65535&n.check)){e.msg="header crc mismatch",n.mode=ta;break}l=0,h=0}n.head&&(n.head.hcrc=n.flags>>9&1,n.head.done=!0),e.adler=n.check=0,n.mode=Ln;break;case Tn:for(;h<32;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}e.adler=n.check=sa(l),l=0,h=0,n.mode=Nn;case Nn:if(0===n.havedict)return e.next_out=o,e.avail_out=d,e.next_in=i,e.avail_in=s,n.hold=l,n.bits=h,vn;e.adler=n.check=1,n.mode=Ln;case Ln:if(t===mn||t===_n)break e;case Un:if(n.last){l>>>=7&h,h-=7&h,n.mode=Xn;break}for(;h<3;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}switch(n.last=1&l,h-=1,3&(l>>>=1)){case 0:n.mode=Fn;break;case 1:if(ma(n),n.mode=Kn,t===_n){l>>>=2,h-=2;break e}break;case 2:n.mode=Hn;break;case 3:e.msg="invalid block type",n.mode=ta}l>>>=2,h-=2;break;case Fn:for(l>>>=7&h,h-=7&h;h<32;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}if((65535&l)!=(l>>>16^65535)){e.msg="invalid stored block lengths",n.mode=ta;break}if(n.length=65535&l,l=0,h=0,n.mode=jn,t===_n)break e;case jn:n.mode=Zn;case Zn:if(f=n.length){if(f>s&&(f=s),f>d&&(f=d),0===f)break e;D.arraySet(r,a,i,f,o),s-=f,i+=f,d-=f,o+=f,n.length-=f;break}n.mode=Ln;break;case Hn:for(;h<14;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}if(n.nlen=257+(31&l),l>>>=5,h-=5,n.ndist=1+(31&l),l>>>=5,h-=5,n.ncode=4+(15&l),l>>>=4,h-=4,n.nlen>286||n.ndist>30){e.msg="too many length or distance symbols",n.mode=ta;break}n.have=0,n.mode=Pn;case Pn:for(;n.have<n.ncode;){for(;h<3;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}n.lens[A[n.have++]]=7&l,l>>>=3,h-=3}for(;n.have<19;)n.lens[A[n.have++]]=0;if(n.lencode=n.lendyn,n.lenbits=7,z={bits:n.lenbits},x=cn(un,n.lens,0,19,n.lencode,0,n.work,z),n.lenbits=z.bits,x){e.msg="invalid code lengths set",n.mode=ta;break}n.have=0,n.mode=$n;case $n:for(;n.have<n.nlen+n.ndist;){for(;_=(S=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,b=65535&S,!((m=S>>>24)<=h);){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}if(b<16)l>>>=m,h-=m,n.lens[n.have++]=b;else{if(16===b){for(C=m+2;h<C;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}if(l>>>=m,h-=m,0===n.have){e.msg="invalid bit length repeat",n.mode=ta;break}y=n.lens[n.have-1],f=3+(3&l),l>>>=2,h-=2}else if(17===b){for(C=m+3;h<C;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}h-=m,y=0,f=3+(7&(l>>>=m)),l>>>=3,h-=3}else{for(C=m+7;h<C;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}h-=m,y=0,f=11+(127&(l>>>=m)),l>>>=7,h-=7}if(n.have+f>n.nlen+n.ndist){e.msg="invalid bit length repeat",n.mode=ta;break}for(;f--;)n.lens[n.have++]=y}}if(n.mode===ta)break;if(0===n.lens[256]){e.msg="invalid code -- missing end-of-block",n.mode=ta;break}if(n.lenbits=9,z={bits:n.lenbits},x=cn(fn,n.lens,0,n.nlen,n.lencode,0,n.work,z),n.lenbits=z.bits,x){e.msg="invalid literal/lengths set",n.mode=ta;break}if(n.distbits=6,n.distcode=n.distdyn,z={bits:n.distbits},x=cn(gn,n.lens,n.nlen,n.ndist,n.distcode,0,n.work,z),n.distbits=z.bits,x){e.msg="invalid distances set",n.mode=ta;break}if(n.mode=Kn,t===_n)break e;case Kn:n.mode=Vn;case Vn:if(s>=6&&d>=258){e.next_out=o,e.avail_out=d,e.next_in=i,e.avail_in=s,n.hold=l,n.bits=h,on(e,u),o=e.next_out,r=e.output,d=e.avail_out,i=e.next_in,a=e.input,s=e.avail_in,l=n.hold,h=n.bits,n.mode===Ln&&(n.back=-1);break}for(n.back=0;_=(S=n.lencode[l&(1<<n.lenbits)-1])>>>16&255,b=65535&S,!((m=S>>>24)<=h);){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}if(_&&0==(240&_)){for(w=m,v=_,k=b;_=(S=n.lencode[k+((l&(1<<w+v)-1)>>w)])>>>16&255,b=65535&S,!(w+(m=S>>>24)<=h);){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}l>>>=w,h-=w,n.back+=w}if(l>>>=m,h-=m,n.back+=m,n.length=b,0===_){n.mode=Gn;break}if(32&_){n.back=-1,n.mode=Ln;break}if(64&_){e.msg="invalid literal/length code",n.mode=ta;break}n.extra=15&_,n.mode=qn;case qn:if(n.extra){for(C=n.extra;h<C;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}n.length+=l&(1<<n.extra)-1,l>>>=n.extra,h-=n.extra,n.back+=n.extra}n.was=n.length,n.mode=Jn;case Jn:for(;_=(S=n.distcode[l&(1<<n.distbits)-1])>>>16&255,b=65535&S,!((m=S>>>24)<=h);){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}if(0==(240&_)){for(w=m,v=_,k=b;_=(S=n.distcode[k+((l&(1<<w+v)-1)>>w)])>>>16&255,b=65535&S,!(w+(m=S>>>24)<=h);){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}l>>>=w,h-=w,n.back+=w}if(l>>>=m,h-=m,n.back+=m,64&_){e.msg="invalid distance code",n.mode=ta;break}n.offset=b,n.extra=15&_,n.mode=Wn;case Wn:if(n.extra){for(C=n.extra;h<C;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}n.offset+=l&(1<<n.extra)-1,l>>>=n.extra,h-=n.extra,n.back+=n.extra}if(n.offset>n.dmax){e.msg="invalid distance too far back",n.mode=ta;break}n.mode=Yn;case Yn:if(0===d)break e;if(f=u-d,n.offset>f){if((f=n.offset-f)>n.whave&&n.sane){e.msg="invalid distance too far back",n.mode=ta;break}f>n.wnext?(f-=n.wnext,g=n.wsize-f):g=n.wnext-f,f>n.length&&(f=n.length),p=n.window}else p=r,g=o-n.offset,f=n.length;f>d&&(f=d),d-=f,n.length-=f;do{r[o++]=p[g++]}while(--f);0===n.length&&(n.mode=Vn);break;case Gn:if(0===d)break e;r[o++]=n.length,d--,n.mode=Vn;break;case Xn:if(n.wrap){for(;h<32;){if(0===s)break e;s--,l|=a[i++]<<h,h+=8}if(u-=d,e.total_out+=u,n.total+=u,u&&(e.adler=n.check=n.flags?Le(n.check,r,u,o-u):De(n.check,r,u,o-u)),u=d,(n.flags?l:sa(l))!==n.check){e.msg="incorrect data check",n.mode=ta;break}l=0,h=0}n.mode=Qn;case Qn:if(n.wrap&&n.flags){for(;h<32;){if(0===s)break e;s--,l+=a[i++]<<h,h+=8}if(l!==(4294967295&n.total)){e.msg="incorrect length check",n.mode=ta;break}l=0,h=0}n.mode=ea;case ea:x=wn;break e;case ta:x=yn;break e;case na:return xn;case aa:default:return kn}return e.next_out=o,e.avail_out=d,e.next_in=i,e.avail_in=s,n.hold=l,n.bits=h,(n.wsize||u!==e.avail_out&&n.mode<ta&&(n.mode<Xn||t!==pn))&&_a(e,e.output,e.next_out,u-e.avail_out),c-=e.avail_in,u-=e.avail_out,e.total_in+=c,e.total_out+=u,n.total+=u,n.wrap&&u&&(e.adler=n.check=n.flags?Le(n.check,r,u,e.next_out-u):De(n.check,r,u,e.next_out-u)),e.data_type=n.bits+(n.last?64:0)+(n.mode===Ln?128:0)+(n.mode===Kn||n.mode===jn?256:0),(0===c&&0===u||t===pn)&&x===bn&&(x=zn),x},inflateEnd:function(e){if(!e||!e.state)return kn;var t=e.state;return t.window&&(t.window=null),e.state=null,bn},inflateGetHeader:function(e,t){var n;return e&&e.state?0==(2&(n=e.state).wrap)?kn:(n.head=t,t.done=!1,bn):kn},inflateSetDictionary:function(e,t){var n,a=t.length;return e&&e.state?0!==(n=e.state).wrap&&n.mode!==Nn?kn:n.mode===Nn&&De(1,t,a,0)!==n.check?yn:_a(e,t,a,a)?(n.mode=na,xn):(n.havedict=1,bn):kn},inflateInfo:"pako inflate (from Nodeca project)"},wa={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8};var va=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1},ka=Object.prototype.toString;function ya(e){if(!(this instanceof ya))return new ya(e);this.options=D.assign({chunkSize:16384,windowBits:0,to:""},e||{});var t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,0===t.windowBits&&(t.windowBits=-15)),!(t.windowBits>=0&&t.windowBits<16)||e&&e.windowBits||(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&0==(15&t.windowBits)&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new Yt,this.strm.avail_out=0;var n=ba.inflateInit2(this.strm,t.windowBits);if(n!==wa.Z_OK)throw new Error(Ue[n]);if(this.header=new va,ba.inflateGetHeader(this.strm,this.header),t.dictionary&&("string"==typeof t.dictionary?t.dictionary=Wt.string2buf(t.dictionary):"[object ArrayBuffer]"===ka.call(t.dictionary)&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(n=ba.inflateSetDictionary(this.strm,t.dictionary))!==wa.Z_OK))throw new Error(Ue[n])}function xa(e,t){var n=new ya(t);if(n.push(e,!0),n.err)throw n.msg||Ue[n.err];return n.result}ya.prototype.push=function(e,t){var n,a,r,i,o,s=this.strm,d=this.options.chunkSize,l=this.options.dictionary,h=!1;if(this.ended)return!1;a=t===~~t?t:!0===t?wa.Z_FINISH:wa.Z_NO_FLUSH,"string"==typeof e?s.input=Wt.binstring2buf(e):"[object ArrayBuffer]"===ka.call(e)?s.input=new Uint8Array(e):s.input=e,s.next_in=0,s.avail_in=s.input.length;do{if(0===s.avail_out&&(s.output=new D.Buf8(d),s.next_out=0,s.avail_out=d),(n=ba.inflate(s,wa.Z_NO_FLUSH))===wa.Z_NEED_DICT&&l&&(n=ba.inflateSetDictionary(this.strm,l)),n===wa.Z_BUF_ERROR&&!0===h&&(n=wa.Z_OK,h=!1),n!==wa.Z_STREAM_END&&n!==wa.Z_OK)return this.onEnd(n),this.ended=!0,!1;s.next_out&&(0!==s.avail_out&&n!==wa.Z_STREAM_END&&(0!==s.avail_in||a!==wa.Z_FINISH&&a!==wa.Z_SYNC_FLUSH)||("string"===this.options.to?(r=Wt.utf8border(s.output,s.next_out),i=s.next_out-r,o=Wt.buf2string(s.output,r),s.next_out=i,s.avail_out=d-i,i&&D.arraySet(s.output,s.output,r,i,0),this.onData(o)):this.onData(D.shrinkBuf(s.output,s.next_out)))),0===s.avail_in&&0===s.avail_out&&(h=!0)}while((s.avail_in>0||0===s.avail_out)&&n!==wa.Z_STREAM_END);return n===wa.Z_STREAM_END&&(a=wa.Z_FINISH),a===wa.Z_FINISH?(n=ba.inflateEnd(this.strm),this.onEnd(n),this.ended=!0,n===wa.Z_OK):a!==wa.Z_SYNC_FLUSH||(this.onEnd(wa.Z_OK),s.avail_out=0,!0)},ya.prototype.onData=function(e){this.chunks.push(e)},ya.prototype.onEnd=function(e){e===wa.Z_OK&&("string"===this.options.to?this.result=this.chunks.join(""):this.result=D.flattenChunks(this.chunks)),this.chunks=[],this.err=e,this.msg=this.strm.msg};var za={Inflate:ya,inflate:xa,inflateRaw:function(e,t){return(t=t||{}).raw=!0,xa(e,t)},ungzip:xa},Ca={};(0,D.assign)(Ca,rn,za,wa);var Sa=Ca;function Ea(e){let t=[];for(let n=0;n<e.length;n++){const a=e[n];t.push(240&a|8),t.push((15&a)<<4|8)}return t}function Aa(e){let t=[];for(let n=0;n<e.length;n+=2){const a=e[n],r=e[n+1];t.push(240&a|r>>4)}return t}function Ba(e){let t=[];return t.push(255&e),t.push(255&e>>8),t.push(255&e>>16),t.push(255&e>>24),t}function Ra(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}Date.prototype.Format=function(e){var t={"M+":this.getMonth()+1,"d+":this.getDate(),"h+":this.getHours(),"m+":this.getMinutes(),"s+":this.getSeconds(),"q+":Math.floor((this.getMonth()+3)/3),S:this.getMilliseconds()};for(var n in/(y+)/.test(e)&&(e=e.replace(RegExp.$1,(this.getFullYear()+"").substr(4-RegExp.$1.length))),t)new RegExp("("+n+")").test(e)&&(e=e.replace(RegExp.$1,1==RegExp.$1.length?t[n]:("00"+t[n]).substr((""+t[n]).length)));return e};class Ia{constructor(e){this.app=e}createImage(e,t){let n=(new TextEncoder).encode(t);n=new Uint8Array([...Ba(n.length),...n]),n=Ea(n);let[a,r]=function(e){let t=1*e.length,n=parseInt(Math.sqrt(t/3)+1),a=n,r=n;return n>500&&(a=500),r=parseInt(t/3/a+1),[a,r,a*r*3]}(n),i=document.createElement("canvas");i.width=a,i.height=r;const o=i.getContext("2d");let s=o.getImageData(0,0,a,r),d=s.data;for(let e=0,t=0;e<d.length;e+=4)t<n.length?(d[e+0]=n[t++],d[e+1]=n[t++],d[e+2]=n[t++],d[e+3]=255):(d[e+0]=parseInt(255*Math.random()),d[e+1]=parseInt(255*Math.random()),d[e+2]=parseInt(255*Math.random()),d[e+3]=255);o.putImageData(s,0,0);var l=document.createElement("a");l.href=i.toDataURL(),l.download=`HPC-${e}-${(new Date).Format("yyyy-MM-dd_hhmmss")}.png`,l.onclick=()=>window.URL.revokeObjectURL(l.href),l.click()}async readImageData(e){return new Promise(t=>{let n=new FileReader;n.readAsArrayBuffer(e),n.onload=function(e){let n=new Uint8Array(e.target.result),a=new Blob([n]),r=window.URL.createObjectURL(a);const i=document.createElement("img");i.src=r,i.onload=()=>{window.URL.revokeObjectURL(r);const e=document.createElement("canvas");e.width=i.width,e.height=i.height;const n=e.getContext("2d");n.drawImage(i,0,0);let a=n.getImageData(0,0,e.width,e.height).data,o=[],s=0;for(let e=0;e<a.length;e+=4)o[s++]=a[e+0],o[s++]=a[e+1],o[s++]=a[e+2];let d=Aa(o),l=Ra(d);d=d.slice(4,4+l);const h=(new TextDecoder).decode(new Uint8Array(d));t(h)}}})}async createImageV2(e,t){let n=document.createElement("input");n.type="file",n.accept="image/*",n.onchange=async n=>{var a=n.target.files[0];let r=new FileReader;r.readAsArrayBuffer(a),r.onload=function(n){let a=new Uint8Array(n.target.result),r=new Blob([a]),i=window.URL.createObjectURL(r);const o=document.createElement("img");o.src=i,o.onload=()=>{window.URL.revokeObjectURL(i);let n=(new TextEncoder).encode(t);n=Sa.deflate(n),n=new Uint8Array([...Ba(n.length),...n]),n=Ea(n);let a=o.width,r=o.height,s=n.length/(o.width*o.height*3-100);console.log("scale",s),s>.7&&(s=.7,r=parseInt((n.length/s+100)/3/a+1)),s=parseInt(255*s)+1;let d=document.createElement("canvas");d.width=a,d.height=r;let l=d.getContext("2d");l.fillStyle="#FFFFFF",l.fillRect(0,0,a,r),l.drawImage(o,0,0);let h=l.getImageData(0,0,d.width,d.height),c=h.data;c[0]=240&s|8,c[1]=(15&s)<<4|8,c[2]=240&parseInt(255*Math.random())|8;let u=0,f=(240&c[1])*(240&c[2]);for(let e=4;e<c.length;e+=4){let t=f%3;f=13*(f+7)%99999997,c[e+3]=255,f/99999997>s/255||(c[e+t]=n[u++%n.length],t++,3==t&&(t=0),c[e+t]=n[u++%n.length],t++,3==t&&(t=0),c[e+t]=n[u++%n.length])}if(u<n.length)throw new Error(`bi:${u} length:${length}`);l.putImageData(h,0,0),d.toBlob(t=>{var n=document.createElement("a");n.href=window.URL.createObjectURL(t),n.download=`HPC-${e}-${(new Date).Format("yyyy-MM-dd_hhmmss")}.png`,n.onclick=()=>{setTimeout(()=>{window.URL.revokeObjectURL(n.href)},15e3)},n.click()})}}},n.click()}async readImageDataV2(e){return new Promise((t,n)=>{let a=new FileReader;a.readAsArrayBuffer(e),a.onload=function(e){let a=new Uint8Array(e.target.result),r=new Blob([a]),i=window.URL.createObjectURL(r);const o=document.createElement("img");o.src=i,o.onload=()=>{window.URL.revokeObjectURL(i);const e=document.createElement("canvas");e.width=o.width,e.height=o.height;const a=e.getContext("2d");a.drawImage(o,0,0);let r=a.getImageData(0,0,e.width,e.height).data,s=240&r[0]|r[1]>>4&15,d=(240&r[1])*(240&r[2]),l=[];for(let e=4;e<r.length;e+=4){let t=d%3;d=13*(d+7)%99999997,d/99999997>s/255||(l.push(r[e+t]),t++,3==t&&(t=0),l.push(r[e+t]),t++,3==t&&(t=0),l.push(r[e+t]))}try{l=Aa(l);let e=Ra(l);l=l.slice(4,4+e),l=Sa.inflate(l);const n=(new TextDecoder).decode(l);t(n)}catch(e){console.error(e),alert(e.stack||e),n(e)}}}})}}const Oa={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t,n,a,r,i,o,s,d="",l=0;for(e=Oa._utf8_encode(e);l<e.length;)r=(t=e.charCodeAt(l++))>>2,i=(3&t)<<4|(n=e.charCodeAt(l++))>>4,o=(15&n)<<2|(a=e.charCodeAt(l++))>>6,s=63&a,isNaN(n)?o=s=64:isNaN(a)&&(s=64),d=d+this._keyStr.charAt(r)+this._keyStr.charAt(i)+this._keyStr.charAt(o)+this._keyStr.charAt(s);return d},decode:function(e){var t,n,a,r,i,o,s="",d=0;for(e=e.replace(/[^A-Za-z0-9+/=]/g,"");d<e.length;)t=this._keyStr.indexOf(e.charAt(d++))<<2|(r=this._keyStr.indexOf(e.charAt(d++)))>>4,n=(15&r)<<4|(i=this._keyStr.indexOf(e.charAt(d++)))>>2,a=(3&i)<<6|(o=this._keyStr.indexOf(e.charAt(d++))),s+=String.fromCharCode(t),64!=i&&(s+=String.fromCharCode(n)),64!=o&&(s+=String.fromCharCode(a));return s=Oa._utf8_decode(s)},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var a=e.charCodeAt(n);a<128?t+=String.fromCharCode(a):a>127&&a<2048?(t+=String.fromCharCode(a>>6|192),t+=String.fromCharCode(63&a|128)):(t+=String.fromCharCode(a>>12|224),t+=String.fromCharCode(a>>6&63|128),t+=String.fromCharCode(63&a|128))}return t},_utf8_decode:function(e){for(var t="",n=0,a=0,r=0,i=0;n<e.length;)(a=e.charCodeAt(n))<128?(t+=String.fromCharCode(a),n++):a>191&&a<224?(r=e.charCodeAt(n+1),t+=String.fromCharCode((31&a)<<6|63&r),n+=2):(r=e.charCodeAt(n+1),i=e.charCodeAt(n+2),t+=String.fromCharCode((15&a)<<12|(63&r)<<6|63&i),n+=3);return t}};class Ma{constructor(){this.Base64=Oa,this.binder=new e,this.store=new R(this),this.picStore=new Ia(this),this.setting=new i(this),this.editor=new g(this),this.view=new I(this),this.hotkey=new O(this),window.app=this,navigator.serviceWorker.register("./cache.js"),window.onhashchange=()=>location.reload(),window.onmessage=e=>{const t=e.data;t.hasOwnProperty("event:editor:iseditormode")&&(this.hotkey.isEditMode=t["event:editor:iseditormode"]),t.hasOwnProperty("event:changestate:blockHotKey")&&(this.hotkey.blockHotKey=t["event:changestate:blockHotKey"])};const t=e=>{e.preventDefault(),e.stopPropagation()};window.ondragenter=t,window.ondragover=t,window.ondragleave=t,window.ondrop=async e=>{if(0==e.dataTransfer.files.length)return;t(e);let n=await this.picStore.readImageDataV2(e.dataTransfer.files[0]);await this.store.saveAllString(n),location.hash=this.store.getPageHash(n),location.reload()}}}new Ma}();</script></html>